Documentation
¶
Overview ¶
Package integrationextensions hosts installable Spinner integration entrypoints. It depends only on Arranger and ext contracts; product extensions remain independently built processes.
Index ¶
- Variables
- func LoadExternalInstalled(ctx context.Context, registry *Registry, inst store.Installed) error
- func LoadExternalInstalledWithConfiguration(ctx context.Context, registry *Registry, inst store.Installed, ...) error
- func LoadExternalInstalledWithDependencies(ctx context.Context, registry *Registry, inst store.Installed, ...) error
- func Supports(descriptor plugin.Descriptor) bool
- type Executor
- type Host
- func (h *Host) Configure(services Services)
- func (h *Host) ReverseOptions(fallback *plugin.ReverseOptions) *plugin.ReverseOptions
- func (h *Host) ReverseOptionsFor(identity plugin.Identity, fallback *plugin.ReverseOptions) *plugin.ReverseOptions
- func (h *Host) StartRequest(identity plugin.Identity, configuration json.RawMessage) integration.RuntimeStartRequest
- type Registry
- func (r *Registry) DeliveryAdapterNames() []string
- func (r *Registry) DependencyReverseOptions(consumer plugin.Identity, bindings []packagekit.Resolution, ...) *plugin.ReverseOptions
- func (r *Registry) ExternalExtensions() []string
- func (r *Registry) Handler() http.Handler
- func (r *Registry) HandlerWithFallback(fallback http.Handler) http.Handler
- func (r *Registry) NativeJobNames() []string
- func (r *Registry) PrivateHandler() http.Handler
- func (r *Registry) RegisterHTTP(identity string, handler http.Handler) error
- func (r *Registry) RegisterHTTPMount(identity, prefix string, handler http.Handler) error
- func (r *Registry) ResolveDeliveryAdapter(name string) (integrationcontract.GatewayDeliveryAdapter, bool)
- func (r *Registry) ResolveDeliveryFailureHandler(adapter string) (integrationcontract.DeliveryFailureHandler, bool)
- func (r *Registry) RunNativeJob(ctx context.Context, language string, source string, payload map[string]any) error
- func (r *Registry) ServeIfMatched(writer http.ResponseWriter, request *http.Request) bool
- func (r *Registry) Unregister(identity string)
- type Services
Constants ¶
This section is empty.
Variables ¶
var DefaultHost = &Host{secrets: secretextensions.DefaultHost}
var DefaultRegistry = NewRegistry()
Functions ¶
func LoadExternalInstalled ¶
func LoadExternalInstalledWithDependencies ¶
func LoadExternalInstalledWithDependencies(ctx context.Context, registry *Registry, inst store.Installed, configuration json.RawMessage, bindings []packagekit.Resolution) error
LoadExternalInstalledWithDependencies starts one verified Integration and grants it only the exact provider bindings selected by packagekit.Resolve. Dependencies are routed through the host; consumers never receive another extension's process handle or credentials.
func Supports ¶
func Supports(descriptor plugin.Descriptor) bool
Types ¶
type Executor ¶
type Executor interface {
integration.Executor
integration.GatewayExecutor
}
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host is late-bound so a package can be launched before an embedded Planner finishes booting. Calls fail closed until Configure installs live services.
func (*Host) ReverseOptions ¶
func (h *Host) ReverseOptions(fallback *plugin.ReverseOptions) *plugin.ReverseOptions
ReverseOptions combines the integration host services with an optional existing reverse host such as Companion Actions.
func (*Host) ReverseOptionsFor ¶
func (h *Host) ReverseOptionsFor(identity plugin.Identity, fallback *plugin.ReverseOptions) *plugin.ReverseOptions
ReverseOptionsFor binds private Planner access to the verified package identity. An Extension can reach only its own private route namespace.
func (*Host) StartRequest ¶
func (h *Host) StartRequest(identity plugin.Identity, configuration json.RawMessage) integration.RuntimeStartRequest
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry owns live process sessions. At most one active extension may claim the public HTTP data endpoint; ambiguity fails closed.
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) DeliveryAdapterNames ¶
DeliveryAdapterNames reports only unambiguous live adapter names so shared delivery workers never claim work they cannot currently execute.
func (*Registry) DependencyReverseOptions ¶
func (r *Registry) DependencyReverseOptions(consumer plugin.Identity, bindings []packagekit.Resolution, fallback *plugin.ReverseOptions) *plugin.ReverseOptions
DependencyReverseOptions exposes only dependency operations resolved for one immutable consumer identity. A missing, replaced, or incompatible provider fails closed; the fallback retains host-owned Arranger capabilities.
func (*Registry) ExternalExtensions ¶
func (*Registry) HandlerWithFallback ¶
func (*Registry) NativeJobNames ¶
NativeJobNames reports only names with one live provider. Planner uses this list while claiming schedules, so unavailable jobs are never advertised.
func (*Registry) PrivateHandler ¶
PrivateHandler exposes only Extension mounts advertised for Spinner's authenticated admin listener. Public mounts can never be reached through it.
func (*Registry) RegisterHTTP ¶
RegisterHTTP installs an already-hosted adapter without importing it into Spinner. It is useful to embedders and tests; production artifact loading uses LoadExternalInstalled and therefore retains process isolation.
func (*Registry) RegisterHTTPMount ¶
RegisterHTTPMount installs an already-hosted, prefix-scoped adapter without importing its implementation into Spinner.
func (*Registry) ResolveDeliveryAdapter ¶
func (r *Registry) ResolveDeliveryAdapter(name string) (integrationcontract.GatewayDeliveryAdapter, bool)
ResolveDeliveryAdapter returns a late-bound adapter backed by exactly one installed Extension. Missing and ambiguous providers fail closed.
func (*Registry) ResolveDeliveryFailureHandler ¶
func (r *Registry) ResolveDeliveryFailureHandler(adapter string) (integrationcontract.DeliveryFailureHandler, bool)
ResolveDeliveryFailureHandler returns a late-bound failure hook backed by exactly one installed Extension. Missing and ambiguous providers fail closed.
func (*Registry) RunNativeJob ¶
func (r *Registry) RunNativeJob(ctx context.Context, language string, source string, payload map[string]any) error
RunNativeJob routes one claimed schedule to exactly one live Extension. Missing and ambiguous providers fail closed.
func (*Registry) ServeIfMatched ¶
ServeIfMatched lets the core HTTP edge handle requests that no installed integration claims. Ambiguous claims still fail closed.
func (*Registry) Unregister ¶
type Services ¶
type Services struct {
Planner integration.Planner
ProtocolPlanner integration.ProtocolPlanner
PassThrough http.Handler
Executor Executor
Automation automation.Executor
Schedules automation.ScheduleRegistrar
Observations integration.ObservationSink
InternalToken string
Start integration.RuntimeStartRequest
}
Services are the host capabilities an installed integration may call. The descriptor still has to declare every exact reverse operation.