Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorContext ¶
type ActorContext struct {
TenantID string `json:"tenant_id"`
OrgID string `json:"org_id"`
WorkspaceID string `json:"workspace_id"`
RoleID string `json:"role_id"`
Environment string `json:"environment"` // dev|stage|prod
Jurisdiction string `json:"jurisdiction"`
DataClassesAllowed []string `json:"data_classes_allowed"`
ApprovalAuthorityScope map[string]interface{} `json:"approval_authority_scope"`
Identity Identity `json:"identity"`
SessionID string `json:"session_id"`
RequestID string `json:"request_id"`
}
ActorContext v2 See helm://schemas/actor_context/v2.json
func (*ActorContext) CanonicalHash ¶
func (c *ActorContext) CanonicalHash() (string, error)
CanonicalHash returns the deterministic hash of the ActorContext.
type KernelRuntime ¶
type KernelRuntime interface {
// SubmitIntent proposes an effect.
// It enters the Decision Engine -> ExecutionIntent -> SafeExecutor pipeline.
SubmitIntent(ctx context.Context, intent *SignedIntent) (*Receipt, error)
// Query executes a read against a projection.
// Reads are auditable and subject to policy.
Query(ctx context.Context, query *QueryRequest) (*QueryResult, error)
// CheckHealth returns the status of the runtime components.
CheckHealth(ctx context.Context) error
}
KernelRuntime is the sole gateway for effecting change or reading state. All capabilities must be invoked through this interface.
type QueryRequest ¶
QueryRequest defines a read operation.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime is the concrete implementation of the Kernel.
func NewRuntime ¶
func NewRuntime( eventRepo interfaces.EventRepository, projEng interfaces.ProjectionEngine, keyring *crypto.KeyRing, ) *Runtime
func (*Runtime) Query ¶
func (r *Runtime) Query(ctx context.Context, query *QueryRequest) (*QueryResult, error)
func (*Runtime) SubmitIntent ¶
type SignedIntent ¶
type SignedIntent struct {
TenantID string
ActorID string
Context *ActorContext // V2 Context
Payload []byte // JSON serialized intent
Signature []byte
}
SignedIntent is a wrapper around an intent payload, signed by an actor. This is the Node 9 (Decision & Execution) intent envelope.
Click to show internal directories.
Click to hide internal directories.