graflo.architecture.evolution.aspects.access¶
The access aspect: integer zone labels on declared types.
The lift adds one reserved field, access_zones: list[int], to each vertex
type and edge relation the spec names. What a zone is and who opens it is not
part of the graph: a caller stamps writes with zone ids and reads with a guard
built from ANY_IN over the zones a reader opens.
Modules:
| Name | Description |
|---|---|
plan |
Planning the access aspect: a reserved |
Attributes¶
ACCESS_ZONES = 'access_zones'
module-attribute
¶
__all__ = ['ACCESS_ZONES', 'access_field', 'plan_access']
module-attribute
¶
Functions:¶
access_field(merge='replace')
¶
access_zones: a reserved list of zone ids, set by the writer's stamp.
Source code in graflo/architecture/evolution/aspects/access/plan.py
plan_access(manifest, *, vertices, edges)
¶
The ops that label vertices and edges with access_zones.
A type that already declares the field keeps it when it is the same field;
one declared with another type or merge mode is a contradiction
(:func:~graflo.architecture.evolution.aspects.join.join).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest
|
GraphManifest
|
the manifest to lift, already |
required |
vertices
|
Mapping[str, FieldMerge]
|
vertex type -> merge mode of its zones. |
required |
edges
|
Mapping[str, FieldMerge]
|
edge relation -> merge mode of its zones. |
required |
Raises:
| Type | Description |
|---|---|
LiftError
|
nothing to label, a type or relation the manifest does not have, or a field that contradicts the aspect's. |