actions

package
v0.3.49 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 14 Imported by: 9

Documentation

Index

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 (*ActionManager) GetActionStatus

func (*ActionManager) GetNewAction

func (a *ActionManager) GetNewAction(name string) *OutstandingAction

func (*ActionManager) GetNewActionId

func (a *ActionManager) GetNewActionId() string

func (*ActionManager) InvokeAction

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)

Jump to

Keyboard shortcuts

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