Documentation
¶
Index ¶
- type CommandOCISignatureVerifier
- type DescriptorLoadTarget
- type ExecutorDescriptor
- type ExtensionManager
- func (em *ExtensionManager) AddLoader(loader Loader)
- func (em *ExtensionManager) GetLoaders() []Loader
- func (em *ExtensionManager) LoadExtensions(ctx context.Context, target LoadTarget) error
- func (manager *ExtensionManager) Stage(ctx context.Context, options StageOptions) (*ExtensionSnapshot, error)
- type ExtensionSnapshot
- func (snapshot *ExtensionSnapshot) Acquire() (*ExtensionSnapshotHandle, error)
- func (snapshot *ExtensionSnapshot) AttachCloser(closer io.Closer) error
- func (snapshot *ExtensionSnapshot) Closed() bool
- func (snapshot *ExtensionSnapshot) Load(ctx context.Context, target LoadTarget) error
- func (snapshot *ExtensionSnapshot) Name() string
- func (snapshot *ExtensionSnapshot) Retire() error
- type ExtensionSnapshotHandle
- type ExtensionSnapshotManager
- type FunctionDef
- type GRPCExecutor
- func (ge *GRPCExecutor) Close() error
- func (ge *GRPCExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
- func (ge *GRPCExecutor) InvocationResolverDescriptor() any
- func (ge *GRPCExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
- func (ge *GRPCExecutor) SourceInfo() verb.SourceInfo
- type HTTPExecutor
- func (he *HTTPExecutor) Close() error
- func (he *HTTPExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
- func (he *HTTPExecutor) InvocationResolverDescriptor() any
- func (he *HTTPExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
- func (he *HTTPExecutor) SourceInfo() verb.SourceInfo
- type IPResolver
- type JSONResourceSpec
- type JSONSchemaLoader
- type JSONVerbLoader
- type JSONVerbSpec
- func (jvs *JSONVerbSpec) GetArgTypes() map[string]string
- func (jvs *JSONVerbSpec) GetCapabilities() []string
- func (jvs *JSONVerbSpec) GetDescription() string
- func (jvs *JSONVerbSpec) GetInverseVerb() string
- func (jvs *JSONVerbSpec) GetName() string
- func (jvs *JSONVerbSpec) GetRequiredArgs() []string
- func (jvs *JSONVerbSpec) GetResources() []ResourceSpec
- func (jvs *JSONVerbSpec) GetReturnType() string
- type LoadTarget
- type Loader
- type MockExecutor
- type NoOpExecutor
- type OCIBundleLoader
- type OCIExecutor
- func (oe *OCIExecutor) Close() error
- func (oe *OCIExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
- func (oe *OCIExecutor) InvocationResolverDescriptor() any
- func (oe *OCIExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
- func (oe *OCIExecutor) SourceInfo() verb.SourceInfo
- func (oe *OCIExecutor) Warmup(ctx context.Context) error
- type OCISignatureVerifier
- type OCIVerificationPolicy
- type OutboundNetworkPolicy
- type ProtoSchemaLoader
- type ProtoVerbLoader
- type ResourceSpec
- type SchemaManifest
- type SourceFile
- type SourceLoadTarget
- type StageOptions
- type StaticSchemaLoader
- func (ssl *StaticSchemaLoader) AddData(path string, value interface{}) *StaticSchemaLoader
- func (ssl *StaticSchemaLoader) AddFunction(name string, fn interface{}) *StaticSchemaLoader
- func (ssl *StaticSchemaLoader) AddType(name string, typeDef TypeDefinition) *StaticSchemaLoader
- func (ssl *StaticSchemaLoader) Load(ctx context.Context, target LoadTarget) error
- func (ssl *StaticSchemaLoader) Name() string
- type StaticSourceLoader
- type StaticVerbLoader
- type StreamExecutor
- func (se *StreamExecutor) Close() error
- func (se *StreamExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
- func (se *StreamExecutor) InvocationResolverDescriptor() any
- func (se *StreamExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
- func (se *StreamExecutor) SourceInfo() verb.SourceInfo
- type TypeDefinition
- type VerbDefinition
- type VerbExecutor
- type VerbManifest
- type VerbSpec
- type VerbTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandOCISignatureVerifier ¶
type CommandOCISignatureVerifier struct{ Path string }
CommandOCISignatureVerifier delegates trust verification to a fixed executable. No shell is used. The executable receives reference and digest.
type DescriptorLoadTarget ¶
type DescriptorLoadTarget interface {
RegisterVerbDescriptor(VerbSpec, ExecutorDescriptor) error
}
DescriptorLoadTarget accepts transport declarations without constructing transport resources. Production staging and compilation use this boundary.
type ExecutorDescriptor ¶
ExecutorDescriptor is immutable loader output. It contains no sockets, clients, goroutines, or callbacks.
type ExtensionManager ¶
type ExtensionManager struct {
// contains filtered or unexported fields
}
ExtensionManager provides a unified way to extend Effectus with verbs and schemas
func NewExtensionManager ¶
func NewExtensionManager() *ExtensionManager
NewExtensionManager creates a new extension manager
func (*ExtensionManager) AddLoader ¶
func (em *ExtensionManager) AddLoader(loader Loader)
AddLoader registers a loader for static or dynamic extensions
func (*ExtensionManager) GetLoaders ¶
func (em *ExtensionManager) GetLoaders() []Loader
GetLoaders returns a copy of the registered loader list.
func (*ExtensionManager) LoadExtensions ¶
func (em *ExtensionManager) LoadExtensions(ctx context.Context, target LoadTarget) error
LoadExtensions loads all registered extensions into the provided registries
func (*ExtensionManager) Stage ¶
func (manager *ExtensionManager) Stage(ctx context.Context, options StageOptions) (*ExtensionSnapshot, error)
type ExtensionSnapshot ¶
type ExtensionSnapshot struct {
// contains filtered or unexported fields
}
ExtensionSnapshot contains immutable loader output. Compilation reads only this snapshot and cannot invoke file, OCI, DNS, or HTTP loaders.
func NewResourceSnapshot ¶
func NewResourceSnapshot(closers ...io.Closer) (*ExtensionSnapshot, error)
NewResourceSnapshot creates snapshot ownership for resources reconstructed from an immutable execution artifact.
func (*ExtensionSnapshot) Acquire ¶
func (snapshot *ExtensionSnapshot) Acquire() (*ExtensionSnapshotHandle, error)
func (*ExtensionSnapshot) AttachCloser ¶
func (snapshot *ExtensionSnapshot) AttachCloser(closer io.Closer) error
AttachCloser adds a runtime-constructed resource to snapshot retirement. It must be called before the snapshot is published or acquired.
func (*ExtensionSnapshot) Closed ¶
func (snapshot *ExtensionSnapshot) Closed() bool
func (*ExtensionSnapshot) Load ¶
func (snapshot *ExtensionSnapshot) Load(ctx context.Context, target LoadTarget) error
func (*ExtensionSnapshot) Name ¶
func (snapshot *ExtensionSnapshot) Name() string
func (*ExtensionSnapshot) Retire ¶
func (snapshot *ExtensionSnapshot) Retire() error
type ExtensionSnapshotHandle ¶
type ExtensionSnapshotHandle struct {
// contains filtered or unexported fields
}
func (*ExtensionSnapshotHandle) Release ¶
func (handle *ExtensionSnapshotHandle) Release() error
func (*ExtensionSnapshotHandle) Snapshot ¶
func (handle *ExtensionSnapshotHandle) Snapshot() *ExtensionSnapshot
type ExtensionSnapshotManager ¶
type ExtensionSnapshotManager struct {
// contains filtered or unexported fields
}
ExtensionSnapshotManager is retained for embedded compatibility. Deprecated: ExecutionRuntime publishes the active snapshot with its checked generation.
func (*ExtensionSnapshotManager) Acquire ¶
func (manager *ExtensionSnapshotManager) Acquire() (*ExtensionSnapshotHandle, error)
func (*ExtensionSnapshotManager) Close ¶
func (manager *ExtensionSnapshotManager) Close() error
func (*ExtensionSnapshotManager) Publish ¶
func (manager *ExtensionSnapshotManager) Publish(snapshot *ExtensionSnapshot) error
type FunctionDef ¶
type FunctionDef struct {
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"` // "builtin", "expression", etc.
Config map[string]interface{} `json:"config,omitempty"`
}
FunctionDef defines a function for dynamic loading
type GRPCExecutor ¶
type GRPCExecutor struct {
Address string
Method string
Timeout time.Duration
Metadata map[string]string
UseTLS bool
Insecure bool
ServerName string
// contains filtered or unexported fields
}
GRPCExecutor executes verbs via gRPC calls.
func NewGRPCExecutor ¶
func NewGRPCExecutor(config map[string]interface{}) (*GRPCExecutor, error)
func (*GRPCExecutor) Close ¶
func (ge *GRPCExecutor) Close() error
func (*GRPCExecutor) Execute ¶
func (ge *GRPCExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
func (*GRPCExecutor) InvocationResolverDescriptor ¶
func (ge *GRPCExecutor) InvocationResolverDescriptor() any
func (*GRPCExecutor) Invoke ¶
func (ge *GRPCExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
func (*GRPCExecutor) SourceInfo ¶
func (ge *GRPCExecutor) SourceInfo() verb.SourceInfo
type HTTPExecutor ¶
type HTTPExecutor struct {
URL string
Method string
Headers map[string]string
Timeout time.Duration
Policy OutboundNetworkPolicy
// contains filtered or unexported fields
}
HTTPExecutor executes verbs via HTTP calls
func NewHTTPExecutor ¶
func NewHTTPExecutor(config map[string]interface{}) (*HTTPExecutor, error)
func (*HTTPExecutor) Close ¶
func (he *HTTPExecutor) Close() error
func (*HTTPExecutor) Execute ¶
func (he *HTTPExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
func (*HTTPExecutor) InvocationResolverDescriptor ¶
func (he *HTTPExecutor) InvocationResolverDescriptor() any
func (*HTTPExecutor) Invoke ¶
func (he *HTTPExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
func (*HTTPExecutor) SourceInfo ¶
func (he *HTTPExecutor) SourceInfo() verb.SourceInfo
type IPResolver ¶
type JSONResourceSpec ¶
type JSONResourceSpec struct {
Resource string `json:"resource"`
Capabilities []string `json:"capabilities"`
}
JSONResourceSpec defines resource requirements in JSON
func (*JSONResourceSpec) GetCapabilities ¶
func (jrs *JSONResourceSpec) GetCapabilities() []string
func (*JSONResourceSpec) GetResource ¶
func (jrs *JSONResourceSpec) GetResource() string
type JSONSchemaLoader ¶
type JSONSchemaLoader struct {
// contains filtered or unexported fields
}
JSONSchemaLoader loads schemas from JSON Schema files
func NewJSONSchemaLoader ¶
func NewJSONSchemaLoader(name, filePath string) *JSONSchemaLoader
NewJSONSchemaLoader creates a JSON schema loader from file
func (*JSONSchemaLoader) Load ¶
func (jsl *JSONSchemaLoader) Load(ctx context.Context, target LoadTarget) error
func (*JSONSchemaLoader) Name ¶
func (jsl *JSONSchemaLoader) Name() string
type JSONVerbLoader ¶
type JSONVerbLoader struct {
// contains filtered or unexported fields
}
JSONVerbLoader loads verbs from JSON files
func NewJSONVerbLoader ¶
func NewJSONVerbLoader(name, filePath string) *JSONVerbLoader
NewJSONVerbLoader creates a JSON verb loader from file
func (*JSONVerbLoader) Load ¶
func (jvl *JSONVerbLoader) Load(ctx context.Context, target LoadTarget) error
func (*JSONVerbLoader) Name ¶
func (jvl *JSONVerbLoader) Name() string
type JSONVerbSpec ¶
type JSONVerbSpec struct {
Name string `json:"name"`
Description string `json:"description"`
Capabilities []string `json:"capabilities"`
Resources []JSONResourceSpec `json:"resources"`
ArgTypes map[string]string `json:"argTypes"`
RequiredArgs []string `json:"requiredArgs"`
ReturnType string `json:"returnType"`
InverseVerb string `json:"inverseVerb,omitempty"`
Target *VerbTarget `json:"target,omitempty"`
}
JSONVerbSpec defines a verb specification in JSON
func (*JSONVerbSpec) GetArgTypes ¶
func (jvs *JSONVerbSpec) GetArgTypes() map[string]string
func (*JSONVerbSpec) GetCapabilities ¶
func (jvs *JSONVerbSpec) GetCapabilities() []string
func (*JSONVerbSpec) GetDescription ¶
func (jvs *JSONVerbSpec) GetDescription() string
func (*JSONVerbSpec) GetInverseVerb ¶
func (jvs *JSONVerbSpec) GetInverseVerb() string
func (*JSONVerbSpec) GetName ¶
func (jvs *JSONVerbSpec) GetName() string
func (*JSONVerbSpec) GetRequiredArgs ¶
func (jvs *JSONVerbSpec) GetRequiredArgs() []string
func (*JSONVerbSpec) GetResources ¶
func (jvs *JSONVerbSpec) GetResources() []ResourceSpec
func (*JSONVerbSpec) GetReturnType ¶
func (jvs *JSONVerbSpec) GetReturnType() string
type LoadTarget ¶
type LoadTarget interface {
RegisterVerb(spec VerbSpec, executor VerbExecutor) error
RegisterFunction(name string, fn interface{}) error
LoadData(path string, value interface{}) error
RegisterType(name string, typeDef TypeDefinition) error
}
LoadTarget defines what can be loaded into
type Loader ¶
type Loader interface {
Name() string
Load(ctx context.Context, target LoadTarget) error
}
Loader defines the interface for extension loaders
func LoadExtensionsFromReader ¶
LoadExtensionsFromReader loads extensions from an io.Reader (for testing)
func LoadFromDirectory ¶
LoadFromDirectory scans a directory for extension files and creates loaders
type MockExecutor ¶
type MockExecutor struct {
Name string
}
MockExecutor provides a simple mock executor for testing
func (*MockExecutor) Execute ¶
func (me *MockExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
func (*MockExecutor) SourceInfo ¶
func (me *MockExecutor) SourceInfo() verb.SourceInfo
type NoOpExecutor ¶
type NoOpExecutor struct{}
NoOpExecutor provides a no-operation executor
func (*NoOpExecutor) Execute ¶
func (noe *NoOpExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
func (*NoOpExecutor) SourceInfo ¶
func (noe *NoOpExecutor) SourceInfo() verb.SourceInfo
type OCIBundleLoader ¶
type OCIBundleLoader struct {
// contains filtered or unexported fields
}
func NewOCIBundleLoader ¶
func NewOCIBundleLoader(name, ref string) *OCIBundleLoader
NewOCIBundleLoader creates an OCI bundle loader
func NewOCIBundleLoaderWithPolicy ¶
func NewOCIBundleLoaderWithPolicy(name, ref string, policy OCIVerificationPolicy) *OCIBundleLoader
func (*OCIBundleLoader) Load ¶
func (obl *OCIBundleLoader) Load(ctx context.Context, target LoadTarget) error
func (*OCIBundleLoader) Name ¶
func (obl *OCIBundleLoader) Name() string
type OCIExecutor ¶
type OCIExecutor struct {
// contains filtered or unexported fields
}
OCIExecutor resolves a verb executor from an OCI extension bundle.
func NewOCIExecutor ¶
func NewOCIExecutor(verbName string, config map[string]interface{}) (*OCIExecutor, error)
func (*OCIExecutor) Close ¶
func (oe *OCIExecutor) Close() error
func (*OCIExecutor) Execute ¶
func (oe *OCIExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
func (*OCIExecutor) InvocationResolverDescriptor ¶
func (oe *OCIExecutor) InvocationResolverDescriptor() any
func (*OCIExecutor) Invoke ¶
func (oe *OCIExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
func (*OCIExecutor) SourceInfo ¶
func (oe *OCIExecutor) SourceInfo() verb.SourceInfo
type OCISignatureVerifier ¶
OCIBundleLoader loads extensions from OCI registry bundles
type OCIVerificationPolicy ¶
type OCIVerificationPolicy struct {
RequireSignature bool
Verifier OCISignatureVerifier
}
type OutboundNetworkPolicy ¶
type OutboundNetworkPolicy struct {
AllowPrivate bool
Resolver IPResolver
MaxRedirects int
DialTimeout time.Duration
}
func (OutboundNetworkPolicy) HTTPClient ¶
func (OutboundNetworkPolicy) ValidateURL ¶
func (policy OutboundNetworkPolicy) ValidateURL(raw string) (*url.URL, error)
type ProtoSchemaLoader ¶
type ProtoSchemaLoader struct {
// contains filtered or unexported fields
}
ProtoSchemaLoader loads schemas from Protocol Buffer messages
func NewProtoSchemaLoader ¶
func NewProtoSchemaLoader(name string, message proto.Message) *ProtoSchemaLoader
NewProtoSchemaLoader creates a protobuf schema loader
func (*ProtoSchemaLoader) Load ¶
func (psl *ProtoSchemaLoader) Load(ctx context.Context, target LoadTarget) error
func (*ProtoSchemaLoader) Name ¶
func (psl *ProtoSchemaLoader) Name() string
type ProtoVerbLoader ¶
type ProtoVerbLoader struct {
// contains filtered or unexported fields
}
ProtoVerbLoader loads verbs from Protocol Buffer messages
func NewProtoVerbLoader ¶
func NewProtoVerbLoader(name string, message proto.Message) *ProtoVerbLoader
NewProtoVerbLoader creates a protobuf verb loader
func (*ProtoVerbLoader) Load ¶
func (pvl *ProtoVerbLoader) Load(ctx context.Context, target LoadTarget) error
func (*ProtoVerbLoader) Name ¶
func (pvl *ProtoVerbLoader) Name() string
type ResourceSpec ¶
ResourceSpec defines resource requirements
type SchemaManifest ¶
type SchemaManifest struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Types map[string]TypeDefinition `json:"types"`
Functions map[string]FunctionDef `json:"functions"`
InitialData map[string]interface{} `json:"initialData,omitempty"`
}
SchemaManifest defines the structure for dynamic schema loading
type SourceFile ¶
SourceFile is one immutable .eff or .effx compiler input.
type SourceLoadTarget ¶
type SourceLoadTarget interface {
RegisterSource(SourceFile) error
}
SourceLoadTarget receives checked-compiler source files from extensions.
type StageOptions ¶
type StaticSchemaLoader ¶
type StaticSchemaLoader struct {
// contains filtered or unexported fields
}
StaticSchemaLoader loads schemas and functions from code
func NewStaticSchemaLoader ¶
func NewStaticSchemaLoader(name string) *StaticSchemaLoader
NewStaticSchemaLoader creates a static schema loader
func (*StaticSchemaLoader) AddData ¶
func (ssl *StaticSchemaLoader) AddData(path string, value interface{}) *StaticSchemaLoader
AddData registers data for fact access
func (*StaticSchemaLoader) AddFunction ¶
func (ssl *StaticSchemaLoader) AddFunction(name string, fn interface{}) *StaticSchemaLoader
AddFunction registers a function for expressions
func (*StaticSchemaLoader) AddType ¶
func (ssl *StaticSchemaLoader) AddType(name string, typeDef TypeDefinition) *StaticSchemaLoader
AddType registers a type definition
func (*StaticSchemaLoader) Load ¶
func (ssl *StaticSchemaLoader) Load(ctx context.Context, target LoadTarget) error
func (*StaticSchemaLoader) Name ¶
func (ssl *StaticSchemaLoader) Name() string
type StaticSourceLoader ¶
type StaticSourceLoader struct {
// contains filtered or unexported fields
}
StaticSourceLoader loads one in-memory .eff or .effx source file.
func NewStaticSourceLoader ¶
func NewStaticSourceLoader(name, path string, data []byte) *StaticSourceLoader
func (*StaticSourceLoader) Load ¶
func (loader *StaticSourceLoader) Load(_ context.Context, target LoadTarget) error
func (*StaticSourceLoader) Name ¶
func (loader *StaticSourceLoader) Name() string
type StaticVerbLoader ¶
type StaticVerbLoader struct {
// contains filtered or unexported fields
}
StaticVerbLoader loads verbs from code (compile-time registration)
func NewStaticVerbLoader ¶
func NewStaticVerbLoader(name string, verbs []VerbDefinition) *StaticVerbLoader
NewStaticVerbLoader creates a static verb loader
func (*StaticVerbLoader) Load ¶
func (svl *StaticVerbLoader) Load(ctx context.Context, target LoadTarget) error
func (*StaticVerbLoader) Name ¶
func (svl *StaticVerbLoader) Name() string
type StreamExecutor ¶
type StreamExecutor struct {
// contains filtered or unexported fields
}
StreamExecutor emits verbs to a stream publisher.
func NewStreamExecutor ¶
func NewStreamExecutor(config map[string]interface{}) (*StreamExecutor, error)
func (*StreamExecutor) Close ¶
func (se *StreamExecutor) Close() error
func (*StreamExecutor) Execute ¶
func (se *StreamExecutor) Execute(ctx context.Context, args map[string]interface{}) (interface{}, error)
func (*StreamExecutor) InvocationResolverDescriptor ¶
func (se *StreamExecutor) InvocationResolverDescriptor() any
func (*StreamExecutor) Invoke ¶
func (se *StreamExecutor) Invoke(ctx context.Context, request invocation.Request) invocation.Outcome
func (*StreamExecutor) SourceInfo ¶
func (se *StreamExecutor) SourceInfo() verb.SourceInfo
type TypeDefinition ¶
type TypeDefinition struct {
Name string `json:"name"`
Type string `json:"type"` // "object", "array", "string", etc.
Properties interface{} `json:"properties,omitempty"`
Required []string `json:"required,omitempty"`
Description string `json:"description,omitempty"`
}
TypeDefinition defines a type for the schema system
type VerbDefinition ¶
type VerbDefinition struct {
Spec VerbSpec
Executor VerbExecutor
}
VerbDefinition defines a verb that can be registered
type VerbExecutor ¶
VerbExecutor is an alias for the core verb executor interface.
type VerbManifest ¶
type VerbManifest struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Verbs []JSONVerbSpec `json:"verbs"`
Executors map[string]interface{} `json:"executors,omitempty"`
}
VerbManifest defines the structure for dynamic verb loading
type VerbSpec ¶
type VerbSpec interface {
GetName() string
GetDescription() string
GetCapabilities() []string
GetResources() []ResourceSpec
GetArgTypes() map[string]string
GetRequiredArgs() []string
GetReturnType() string
GetInverseVerb() string
}
VerbSpec defines a verb specification interface
type VerbTarget ¶
type VerbTarget struct {
Type string `json:"type"`
Ref string `json:"ref,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
}
VerbTarget defines how a verb should be executed.