Documentation
¶
Index ¶
- type ActionHandler
- type ActionManager
- func (a *ActionManager) CleanupOldActions(ctx context.Context)
- func (a *ActionManager) GetActionSchema(ctx context.Context, name string) (*v2.BatonActionSchema, annotations.Annotations, error)
- func (a *ActionManager) GetActionStatus(ctx context.Context, actionId string) (v2.BatonActionStatus, string, *structpb.Struct, annotations.Annotations, error)
- func (a *ActionManager) GetNewAction(name string) *OutstandingAction
- func (a *ActionManager) GetNewActionId() string
- func (a *ActionManager) InvokeAction(ctx context.Context, name string, args *structpb.Struct) (string, v2.BatonActionStatus, *structpb.Struct, annotations.Annotations, error)
- func (a *ActionManager) ListActionSchemas(ctx context.Context) ([]*v2.BatonActionSchema, annotations.Annotations, error)
- func (a *ActionManager) RegisterAction(ctx context.Context, name string, schema *v2.BatonActionSchema, ...) error
- func (a *ActionManager) UnregisterAction(ctx context.Context, name string) error
- type OutstandingAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionHandler ¶
type ActionHandler func(ctx context.Context, args *structpb.Struct) (*structpb.Struct, annotations.Annotations, error)
type ActionManager ¶
type ActionManager struct {
// contains filtered or unexported fields
}
func NewActionManager ¶
func NewActionManager(_ context.Context) *ActionManager
func (*ActionManager) CleanupOldActions ¶
func (a *ActionManager) CleanupOldActions(ctx context.Context)
func (*ActionManager) GetActionSchema ¶
func (a *ActionManager) GetActionSchema(ctx context.Context, name string) (*v2.BatonActionSchema, annotations.Annotations, error)
func (*ActionManager) GetActionStatus ¶
func (a *ActionManager) GetActionStatus(ctx context.Context, actionId string) (v2.BatonActionStatus, string, *structpb.Struct, annotations.Annotations, error)
func (*ActionManager) GetNewAction ¶
func (a *ActionManager) GetNewAction(name string) *OutstandingAction
func (*ActionManager) GetNewActionId ¶
func (a *ActionManager) GetNewActionId() string
func (*ActionManager) InvokeAction ¶
func (a *ActionManager) InvokeAction(ctx context.Context, name string, args *structpb.Struct) (string, v2.BatonActionStatus, *structpb.Struct, annotations.Annotations, error)
func (*ActionManager) ListActionSchemas ¶
func (a *ActionManager) ListActionSchemas(ctx context.Context) ([]*v2.BatonActionSchema, annotations.Annotations, error)
func (*ActionManager) RegisterAction ¶
func (a *ActionManager) RegisterAction(ctx context.Context, name string, schema *v2.BatonActionSchema, handler ActionHandler) error
func (*ActionManager) UnregisterAction ¶
func (a *ActionManager) UnregisterAction(ctx context.Context, name string) error
type OutstandingAction ¶
type OutstandingAction struct {
Id string
Name string
Status v2.BatonActionStatus
Rv *structpb.Struct
Annos annotations.Annotations
Err error
StartedAt time.Time
sync.Mutex
}
func NewOutstandingAction ¶
func NewOutstandingAction(id, name string) *OutstandingAction
func (*OutstandingAction) SetError ¶ added in v0.2.72
func (oa *OutstandingAction) SetError(ctx context.Context, err error)
func (*OutstandingAction) SetStatus ¶
func (oa *OutstandingAction) SetStatus(ctx context.Context, status v2.BatonActionStatus)
Click to show internal directories.
Click to hide internal directories.