service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package service implements the provider-neutral service@v1 step kind. Provider process/container identities and handles remain behind Host; the adapter exports only bounded opaque references and typed readiness outputs.

Index

Constants

View Source
const (
	KindName    = "service"
	KindVersion = "v1"
)

Variables

View Source
var (
	ErrInvalidOptions = errors.New("invalid service adapter options")
	ErrInvalidConfig  = errors.New("invalid service configuration")
)

Functions

This section is empty.

Types

type Host

Host is the provider binding. Start and RequestStop must be exactly idempotent for their keys; Observe must not retain caller-owned aliases.

type Kind

type Kind struct {
	// contains filtered or unexported fields
}

func New

func New(options Options) (*Kind, error)

func Register

func Register(registry stepkind.Registry, options Options) (*Kind, error)

func (*Kind) Execute

func (k *Kind) Execute(ctx context.Context, prepared stepkind.PreparedInvocation) (stepkind.StepResult, error)

func (*Kind) ObserveService

func (*Kind) RequestStop

func (k *Kind) RequestStop(ctx context.Context, ref stepkind.ExternalOperationRef, key string) error

func (*Kind) Spec

func (*Kind) Spec() stepkind.StepKindSpec

func (*Kind) ValidateConfig

func (*Kind) ValidateConfig(_ context.Context, config graph.Config) []diagnostic.Diagnostic

type Options

type Options struct{ Host Host }

type StartRequest

type StartRequest struct {
	Identity       stepkind.InvocationIdentity `json:"identity"`
	Provider       string                      `json:"provider"`
	Config         graph.Config                `json:"config"`
	IdempotencyKey string                      `json:"idempotency_key"`
}

StartRequest is the immutable, idempotent provider request. Config is an adapter-owned JSON object; hosts must defensively copy it and persist only its digest plus non-secret provider references.

Jump to

Keyboard shortcuts

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