provisioning

package
v0.0.91 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(h *Handlers)

func HandleInvoke

func HandleInvoke(f InvokeFunc)

func RunServer

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

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
}

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) 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 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