Documentation ¶
Index ¶
- Variables
- func Compile[M proto.Message](compiler compilerFunc)
- func Execute(ctx context.Context, config cfg.Context, actionName string, g *Plan, ...) error
- func Get[V any](ctx context.Context, inj Injection[V]) (V, error)
- func RawExecute(ctx context.Context, config cfg.Context, actionName string, g *Plan, ...) error
- func RegisterFuncs[M proto.Message](funcs Funcs[M])
- func RegisterHandlerFunc[M proto.Message](...)
- func RegisterVFuncs[M proto.Message, V any](funcs VFuncs[M, V])
- func Serialize(g *Plan) *schema.SerializedProgram
- func Value[M proto.Message](inv *schema.SerializedInvocation, name string) (M, error)
- type Funcs
- type HandleResult
- type Injection
- type InjectionInstance
- type Input
- type Inputs
- type Output
- type Plan
- type VFuncs
- type WaitHandler
- type Waiter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ConfigurationInjection = Define[cfg.Configuration]("ns.configuration") EnvironmentInjection = Define[*schema.Environment]("ns.schema.environment") )
View Source
var InputsInjection = Define[Inputs]("namespace.ops.inputs")
Functions ¶
func Execute ¶
func Execute(ctx context.Context, config cfg.Context, actionName string, g *Plan, channelHandler WaitHandler, injected ...InjectionInstance) error
func RawExecute ¶
func RawExecute(ctx context.Context, config cfg.Context, actionName string, g *Plan, injected ...InjectionInstance) error
Don't use this method if you don't have a use-case for it, use Execute.
func RegisterFuncs ¶
func RegisterHandlerFunc ¶
func RegisterHandlerFunc[M proto.Message](handle func(context.Context, *schema.SerializedInvocation, M) (*HandleResult, error))
func Serialize ¶
func Serialize(g *Plan) *schema.SerializedProgram
Types ¶
type Funcs ¶
type Funcs[M proto.Message] struct { Aliases []string EmitStart func(context.Context, *schema.SerializedInvocation, M, chan *orchestration.Event) Handle func(context.Context, *schema.SerializedInvocation, M) (*HandleResult, error) HandleWithEvents func(context.Context, *schema.SerializedInvocation, M, chan *orchestration.Event) (*HandleResult, error) PlanOrder func(context.Context, M) (*schema.ScheduleOrder, error) }
type HandleResult ¶
type Injection ¶
type Injection[V any] struct { // contains filtered or unexported fields }
func (Injection[V]) With ¶
func (inj Injection[V]) With(value V) InjectionInstance
type InjectionInstance ¶
type InjectionInstance struct {
// contains filtered or unexported fields
}
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
A plan collects a set of invocations which can then be executed as a batch.
func NewEmptyPlan ¶
func NewEmptyPlan() *Plan
func NewPlan ¶
func NewPlan(defs ...*schema.SerializedInvocation) *Plan
func (*Plan) Definitions ¶
func (g *Plan) Definitions() []*schema.SerializedInvocation
type VFuncs ¶
type VFuncs[M proto.Message, V any] struct { Parse func(context.Context, *schema.SerializedInvocation, M) (V, error) EmitStart func(context.Context, *schema.SerializedInvocation, V, chan *orchestration.Event) Handle func(context.Context, *schema.SerializedInvocation, V) (*HandleResult, error) HandleWithEvents func(context.Context, *schema.SerializedInvocation, V, chan *orchestration.Event) (*HandleResult, error) PlanOrder func(context.Context, V) (*schema.ScheduleOrder, error) }
type WaitHandler ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.