Documentation ¶
Index ¶
- Variables
- func Compile[M proto.Message](compiler compilerFunc)
- func ComputedValue[M proto.Message](inv *schema.SerializedInvocation, name string) (M, error)
- func Execute(ctx context.Context, actionName string, g *Plan, channelHandler WaitHandler, ...) error
- func ExecuteExt(ctx context.Context, actionName string, g *Plan, channelHandler WaitHandler, ...) error
- func Get[V any](ctx context.Context, inj Injection[V]) (V, error)
- func RawExecute(ctx context.Context, actionName string, opts ExecuteOpts, 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
- type ExecuteOpts
- type Funcs
- type HandleResult
- type Injection
- type InjectionInstance
- type Input
- type Inputs
- type MakeInjectionInstance
- type MakeInjectionInstanceFunc
- 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 ComputedValue ¶ added in v0.0.100
func Execute ¶
func Execute(ctx context.Context, actionName string, g *Plan, channelHandler WaitHandler, injected ...MakeInjectionInstance) error
func ExecuteExt ¶ added in v0.0.100
func ExecuteExt(ctx context.Context, actionName string, g *Plan, channelHandler WaitHandler, opts ExecuteOpts, injected ...MakeInjectionInstance) error
func RawExecute ¶
func RawExecute(ctx context.Context, actionName string, opts ExecuteOpts, g *Plan, injected ...MakeInjectionInstance) 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 ExecuteOpts ¶ added in v0.0.100
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
}
func (InjectionInstance) MakeInjection ¶ added in v0.0.100
func (ij InjectionInstance) MakeInjection() []InjectionInstance
type MakeInjectionInstance ¶ added in v0.0.100
type MakeInjectionInstance interface {
MakeInjection() []InjectionInstance
}
func FromContext ¶ added in v0.0.100
func FromContext(env cfg.Context) MakeInjectionInstance
type MakeInjectionInstanceFunc ¶ added in v0.0.100
type MakeInjectionInstanceFunc func() []InjectionInstance
func (MakeInjectionInstanceFunc) MakeInjection ¶ added in v0.0.100
func (m MakeInjectionInstanceFunc) MakeInjection() []InjectionInstance
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.