Documentation
¶
Overview ¶
Package plugin adapts Go transports and policies to the canonical C host.
Index ¶
- Variables
- type Launch
- type Library
- func (l *Library) NewRegistry() (*Registry, error)
- func (lib *Library) Objects() *library.Described
- func (lib *Library) Open(ctx context.Context, d engine.Descriptor, o engine.Options) (*Session, error)
- func (lib *Library) OpenProcess(ctx context.Context, d engine.Descriptor, launch Launch, ...) (*Session, error)
- type Registry
- func (r *Registry) Close() error
- func (r *Registry) OpenProcess(ctx context.Context, d engine.Descriptor, launch Launch, ...) (*Session, error)
- func (r *Registry) Register(ref engine.ContractRef, s *Session) error
- func (r *Registry) Route(from engine.ContractRef, operation string, to engine.ContractRef, ...) error
- func (r *Registry) Unregister(ref engine.ContractRef) error
- type Session
- func (s *Session) Abort() error
- func (s *Session) AdmitReverse(frame engine.ReverseRequestFrame) (func() engine.ReverseResult, *engine.ReverseResult, error)
- func (s *Session) Call(ctx context.Context, contract engine.ContractRef, operation string, ...) (json.RawMessage, error)
- func (s *Session) CallProgress(ctx context.Context, contract engine.ContractRef, operation string, ...) (json.RawMessage, error)
- func (s *Session) Close(ctx context.Context) error
- func (s *Session) Descriptor() engine.Descriptor
- func (s *Session) Done() <-chan struct{}
- func (s *Session) State() engine.State
- func (s *Session) Stderr() string
Constants ¶
This section is empty.
Variables ¶
var ErrRegistryExists = errors.New("plugin registry entry already exists")
Functions ¶
This section is empty.
Types ¶
type Launch ¶
type Launch struct {
Executable string
Arguments []string
Environment []string
Directory string
StderrBytes int
}
Launch is a child process the engine starts.
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
func Default ¶
Default opens an explicitly configured, embedded, or executable-bundled C engine. Missing libraries are errors; there is no legacy Go host fallback.
func (*Library) NewRegistry ¶
func (*Library) Objects ¶
Objects exposes the canonical C library interface for operations beyond sessions.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry owns native reverse-call routes. C performs admission and cycle detection across every attached host, including concurrent call chains.
func (*Registry) OpenProcess ¶
func (*Registry) Route ¶
func (r *Registry) Route(from engine.ContractRef, operation string, to engine.ContractRef, targetOperation string) error
func (*Registry) Unregister ¶
func (r *Registry) Unregister(ref engine.ContractRef) error
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) AdmitReverse ¶
func (s *Session) AdmitReverse(frame engine.ReverseRequestFrame) (func() engine.ReverseResult, *engine.ReverseResult, error)
func (*Session) Call ¶
func (s *Session) Call(ctx context.Context, contract engine.ContractRef, operation string, payload json.RawMessage) (json.RawMessage, error)
func (*Session) CallProgress ¶
func (s *Session) CallProgress(ctx context.Context, contract engine.ContractRef, operation string, payload json.RawMessage, onProgress func(engine.Progress), options ...engine.CallOptions) (json.RawMessage, error)
func (*Session) Descriptor ¶
func (s *Session) Descriptor() engine.Descriptor