Documentation
¶
Overview ¶
Package capability contains optional, independently versioned SDK contracts.
Index ¶
- func ConfigurationMethod() author.Method[Configuration, Configured]
- func HealthMethod() author.Method[HealthRequest, Health]
- func RegisterConfiguration(r *author.Registry, manager Configurer, configSchema schema.Schema, ...) error
- func RegisterHealth(r *author.Registry, check func(context.Context) (Health, error)) error
- type Configuration
- type Configured
- type Configurer
- type Health
- type HealthRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigurationMethod ¶
func ConfigurationMethod() author.Method[Configuration, Configured]
func HealthMethod ¶
func HealthMethod() author.Method[HealthRequest, Health]
func RegisterConfiguration ¶
func RegisterConfiguration(r *author.Registry, manager Configurer, configSchema schema.Schema, scope func(context.Context, plugin.Request, string) (string, error)) error
RegisterConfiguration requires an authenticated scope mapping. The mapper derives the manager key from the request's admitted subject and instance ID; this prevents two tenants from accidentally sharing a configured resource. Configuration values must not contain credentials; hosts own secret delivery.
Types ¶
type Configuration ¶
type Configuration struct {
Instance string `json:"instance"`
Revision string `json:"revision"`
Values json.RawMessage `json:"values"`
}
type Configured ¶
type Configurer ¶
type Configurer interface {
Configure(ctx context.Context, key, revision string, config json.RawMessage) error
}
Configurer applies a configuration to the instance stored under key. Both *instance.Manager[T] and the C engine's *cgoengine.Instances[T] implement it, so these helpers work over either.
type HealthRequest ¶
type HealthRequest struct{}