package
4.2.2-release-20240117173031+incompatible
Repository: https://github.com/oceanbase/obagent.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
ExecutionTokenFromString convert a string to a ExecutionToken.
No description provided by the author
NewExecutionContext Creates a new ExecutionContext with an Input.
NewExecutor create a new Executor with a StatusStore.
NewFileTaskStore create a new FileTaskStore with a fs dir to store data in.
NewInput Creates a new Input with context.Context and parameter.
NewInputExecutionContext Create a new ExecutionContext with context.Context and a param A shortcut function of NewExecutionContext(NewInput(ctx, param)).
NewTask create a new Task.
WrapFunc converts a function into a Task form of function can be one of:
func() RetType func() (RetType, error) func() error func(arg SomeType) RetType func(arg SomeType) (RetType, error) func(arg SomeType) error func(ctx context.Context, arg SomeType) RetType func(ctx context.Context, arg SomeType) (RetType, error) func(ctx context.Context, arg SomeType) error func(ctx context.Context) RetType func(ctx context.Context) (RetType, error) func(ctx context.Context) error.
# Constants
FilePrefix all files stored by FileTaskStore will have a name starts with it.
No description provided by the author
TypeBinary binary result, may be a []byte.Binary data won't be serialize or deserialize when storing or loading result.
TypeStructured Structured result, may be struct, map, etc.Structured data Will be serialize when storing result or deserialize when loading result.
TypeText plain text result, may be a string.Text data won't be serialize or deserialize when storing or loading result.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Execution a running command execution.
ExecutionContext Execution Context for a Command to be executed with.
ExecutionToken A token returned to caller of Executor.Execute.
Executor runs Command s and maintains Command s' status Executor can run Command background and return a ExecutionToken.
FileTaskStore StatusStore implement that save data in local file system.
Input command execution input.
Output Command execution output, used to handle command result, error, notify command finish event...
OutputStatus A snapshot of execution Output.
StoredStatus struct used to serialize/deserialize execution status.
Task a Command implement that turns synchronize function call to a Command.
# Interfaces
Command Abstract command interface, represents an executable object which accept a parameter and return a result or an error.
StatusStore Abstract storage for execution status.
# Type aliases
Annotation type alias for annotation data May contains some extra data out of input parameter like trace id, request id.
CancelFunc function to be executed when cmd canceled.
DataType an enum type of data type of command result.
ProgressFunc function to update execution progress.
TaskFunc A function represents a Task.