provisioning

package
v0.0.333 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(h *Handlers)

func HandleInvocation added in v0.0.108

func HandleInvocation(ctx context.Context, register func(grpc.ServiceRegistrar)) error

func HandleInvoke

func HandleInvoke(f InvokeFunc)

Types

type AllHandlers

type AllHandlers interface {
	StackHandler

	Invoke(context.Context, Request) (*protocol.InvokeResponse, error)
}

type ApplyOutput

type ApplyOutput struct {
	// Invocations yield serialized invocations.
	Invocations []defs.MakeDefinition
	// A serialized invocation which will be invoked with the result of a computed set of computable values.
	InvocationSources []*schema.SerializedInvocationSource
	// Extensions yield runtime-specific extension, which influence the output of the runtime's deployment.
	Extensions []defs.MakeExtension
	// Computed set of values generated by the tool (e.g. computed ingress).
	Computed []*schema.ComputedConfiguration
	// Extend the server definition.
	ServerExtensions []*schema.ServerExtension
	// Output a resource instance.
	OutputResourceInstance proto.Message
	// Set of resources that should be passed to the initializer.
	ComputedResourceInput []ResourceInput
}

type Compilable

type Compilable interface {
	Compile(StackRequest, *ApplyOutput) error
}

type DeleteOutput

type DeleteOutput struct {
	Invocations []defs.MakeDefinition
}

type HandlerRoute

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

type Handlers

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

func NewHandlers

func NewHandlers() *Handlers

func (*Handlers) Any

func (hs *Handlers) Any() *MatchingHandlers

func (*Handlers) Handler

func (hs *Handlers) Handler() AllHandlers

func (*Handlers) MatchEnv

func (hs *Handlers) MatchEnv(env *schema.Environment) *MatchingHandlers

func (*Handlers) ServiceHandler

func (hs *Handlers) ServiceHandler() protocol.InvocationServiceServer

type InvokeFunc

type InvokeFunc func(context.Context, Request) (*protocol.InvokeResponse, error)

type MatchingHandlers

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

func (*MatchingHandlers) HandleApply added in v0.0.103

func (mh *MatchingHandlers) HandleApply(apply func(context.Context, StackRequest, *ApplyOutput) error) *HandlerRoute

func (*MatchingHandlers) HandleInvoke

func (mh *MatchingHandlers) HandleInvoke(f InvokeFunc) *MatchingHandlers

func (*MatchingHandlers) HandleStack

func (mh *MatchingHandlers) HandleStack(h StackHandler) *HandlerRoute

type Request

type Request struct {
	Snapshots map[string]fs.FS
	// contains filtered or unexported fields
}

func (Request) CheckUnpackInput

func (p Request) CheckUnpackInput(msg proto.Message) (bool, error)

func (Request) PackageOwner

func (p Request) PackageOwner() string

PackageOwner returns the name of the package that defined this tool.

func (Request) UnpackInput

func (p Request) UnpackInput(msg proto.Message) error

type ResourceInput added in v0.0.111

type ResourceInput struct {
	Name   string
	Class  *schema.PackageRef
	Intent proto.Message
}

type StackHandler

type StackHandler interface {
	Apply(context.Context, StackRequest, *ApplyOutput) error
	Delete(context.Context, StackRequest, *DeleteOutput) error
}

type StackRequest

type StackRequest struct {
	Request
	Env   *schema.Environment
	Focus *schema.Stack_Entry
	Stack *schema.Stack
}

type Tool

type Tool interface {
	StackHandler
}

XXX remove Tool when all the uses are gone.

Jump to

Keyboard shortcuts

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