statemachine

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLogger

func WithLogger(ctx context.Context, logger *slog.Logger) context.Context

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

func NewCore

func NewCore(ctx context.Context) (*Core, error)

func (*Core) Close

func (core *Core) Close(ctx context.Context) error

func (*Core) NewStateMachine

func (core *Core) NewStateMachine(ctx context.Context, headers []*pbinternal.Header) (*StateMachine, error)

type DoProgressAnyCompleted

type DoProgressAnyCompleted struct{}

type DoProgressCancelSignalReceived

type DoProgressCancelSignalReceived struct{}

type DoProgressExecuteRun

type DoProgressExecuteRun struct {
	Handle uint32
}

type DoProgressReadFromInput

type DoProgressReadFromInput struct{}

type DoProgressResult

type DoProgressResult interface {
	// contains filtered or unexported methods
}

type DoProgressWaitingPendingRun

type DoProgressWaitingPendingRun struct{}

type StateMachine

type StateMachine struct {
	// contains filtered or unexported fields
}

func (*StateMachine) DoProgress

func (sm *StateMachine) DoProgress(ctx context.Context, handles []uint32) (DoProgressResult, error)

func (*StateMachine) Free

func (sm *StateMachine) Free(ctx context.Context) error

func (*StateMachine) GetResponseHead

func (sm *StateMachine) GetResponseHead(ctx context.Context) (*pbinternal.VmGetResponseHeadReturn, error)

func (*StateMachine) IsCompleted

func (sm *StateMachine) IsCompleted(ctx context.Context, handle uint32) (bool, error)

func (*StateMachine) IsProcessing

func (sm *StateMachine) IsProcessing(ctx context.Context) (bool, error)

func (*StateMachine) IsReadyToExecute

func (sm *StateMachine) IsReadyToExecute(ctx context.Context) (bool, error)

func (*StateMachine) NotifyError

func (sm *StateMachine) NotifyError(ctx context.Context, message string, stacktrace string) error

func (*StateMachine) NotifyInput

func (sm *StateMachine) NotifyInput(ctx context.Context, bytes []byte) error

func (*StateMachine) NotifyInputClosed

func (sm *StateMachine) NotifyInputClosed(ctx context.Context) error

func (*StateMachine) ProposeRunCompletion

func (sm *StateMachine) ProposeRunCompletion(ctx context.Context, input *pbinternal.VmProposeRunCompletionParameters) error

func (*StateMachine) SysAttachInvocation

func (sm *StateMachine) SysAttachInvocation(ctx context.Context, invocationId string) (uint32, error)

func (*StateMachine) SysAwakeable

func (sm *StateMachine) SysAwakeable(ctx context.Context) (string, uint32, error)

func (*StateMachine) SysCall

func (*StateMachine) SysCancelInvocation

func (sm *StateMachine) SysCancelInvocation(ctx context.Context, invocationId string) error

func (*StateMachine) SysCompleteAwakeable

func (sm *StateMachine) SysCompleteAwakeable(ctx context.Context, input *pbinternal.VmSysCompleteAwakeableParameters) error

func (*StateMachine) SysEnd

func (sm *StateMachine) SysEnd(ctx context.Context) error

func (*StateMachine) SysInput

func (*StateMachine) SysPromiseComplete

func (sm *StateMachine) SysPromiseComplete(ctx context.Context, input *pbinternal.VmSysPromiseCompleteParameters) (uint32, error)

func (*StateMachine) SysPromiseGet

func (sm *StateMachine) SysPromiseGet(ctx context.Context, key string) (uint32, error)

func (*StateMachine) SysPromisePeek

func (sm *StateMachine) SysPromisePeek(ctx context.Context, key string) (uint32, error)

func (*StateMachine) SysRun

func (sm *StateMachine) SysRun(ctx context.Context, name string) (uint32, error)

func (*StateMachine) SysSend

func (*StateMachine) SysSleep

func (sm *StateMachine) SysSleep(ctx context.Context, name string, duration time.Duration) (uint32, error)

func (*StateMachine) SysStateClear

func (sm *StateMachine) SysStateClear(ctx context.Context, key string) error

func (*StateMachine) SysStateClearAll

func (sm *StateMachine) SysStateClearAll(ctx context.Context) error

func (*StateMachine) SysStateGet

func (sm *StateMachine) SysStateGet(ctx context.Context, key string) (uint32, error)

func (*StateMachine) SysStateGetKeys

func (sm *StateMachine) SysStateGetKeys(ctx context.Context) (uint32, error)

func (*StateMachine) SysStateSet

func (sm *StateMachine) SysStateSet(ctx context.Context, key string, value []byte) error

func (*StateMachine) SysWriteOutput

func (sm *StateMachine) SysWriteOutput(ctx context.Context, input *pbinternal.VmSysWriteOutputParameters) error

func (*StateMachine) TakeNotification

func (sm *StateMachine) TakeNotification(ctx context.Context, handle uint32) (Value, error)

func (*StateMachine) TakeOutput

func (sm *StateMachine) TakeOutput(ctx context.Context) ([]byte, error)

type SuspensionError

type SuspensionError struct{}

func (SuspensionError) Error

func (s SuspensionError) Error() string

type Value

type Value interface {
	// contains filtered or unexported methods
}

type ValueExecuteRun

type ValueExecuteRun struct {
	Handle uint32
}

type ValueFailure

type ValueFailure struct {
	Failure *pbinternal.Failure
}

type ValueInvocationId

type ValueInvocationId struct {
	InvocationId string
}

type ValueStateKeys

type ValueStateKeys struct {
	Keys []string
}

type ValueSuccess

type ValueSuccess struct {
	Success []byte
}

type ValueVoid

type ValueVoid struct{}

Jump to

Keyboard shortcuts

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