integrationextensions

package
v0.0.0-...-2305522 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package integrationextensions hosts installable Spinner integration entrypoints. It depends only on Arranger and ext contracts; product extensions remain independently built processes.

Index

Constants

This section is empty.

Variables

View Source
var DefaultHost = &Host{secrets: secretextensions.DefaultHost}
View Source
var DefaultRegistry = NewRegistry()

Functions

func LoadExternalInstalled

func LoadExternalInstalled(ctx context.Context, registry *Registry, inst store.Installed) error

func LoadExternalInstalledWithConfiguration

func LoadExternalInstalledWithConfiguration(ctx context.Context, registry *Registry, inst store.Installed, configuration json.RawMessage) error

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 NewHost

func NewHost() *Host

func (*Host) Configure

func (h *Host) Configure(services 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

func (r *Registry) DeliveryAdapterNames() []string

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 (r *Registry) ExternalExtensions() []string

func (*Registry) Handler

func (r *Registry) Handler() http.Handler

func (*Registry) HandlerWithFallback

func (r *Registry) HandlerWithFallback(fallback http.Handler) http.Handler

func (*Registry) NativeJobNames

func (r *Registry) NativeJobNames() []string

NativeJobNames reports only names with one live provider. Planner uses this list while claiming schedules, so unavailable jobs are never advertised.

func (*Registry) PrivateHandler

func (r *Registry) PrivateHandler() http.Handler

PrivateHandler exposes only Extension mounts advertised for Spinner's authenticated admin listener. Public mounts can never be reached through it.

func (*Registry) RegisterHTTP

func (r *Registry) RegisterHTTP(identity string, handler http.Handler) error

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

func (r *Registry) RegisterHTTPMount(identity, prefix string, handler http.Handler) error

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

func (r *Registry) ServeIfMatched(writer http.ResponseWriter, request *http.Request) bool

ServeIfMatched lets the core HTTP edge handle requests that no installed integration claims. Ambiguous claims still fail closed.

func (*Registry) Unregister

func (r *Registry) Unregister(identity string)

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.

Directories

Path Synopsis
Package catalog installs explicitly versioned Integration extension executables from a trusted local or HTTPS catalog.
Package catalog installs explicitly versioned Integration extension executables from a trusted local or HTTPS catalog.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL