Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultActionListenerRetryInterval = 5 * time.Second DefaultActionListenerRetryCount = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // the worker id WorkerId string // the tenant id TenantId string // the job id JobId string // the job name JobName string // the job run id JobRunId string // the step id StepId string // the step run id StepRunId string // the action id ActionId string // the action payload ActionPayload ActionPayload // the action type ActionType ActionType }
type ActionEvent ¶
type ActionEvent struct { *Action // the event timestamp EventTimestamp *time.Time // the step event type EventType ActionEventType // The event payload. This must be JSON-compatible as it gets marshalled to a JSON string. EventPayload interface{} }
type ActionEventResponse ¶
type ActionEventType ¶
type ActionEventType string
const ( ActionEventTypeUnknown ActionEventType = "STEP_EVENT_TYPE_UNKNOWN" ActionEventTypeStarted ActionEventType = "STEP_EVENT_TYPE_STARTED" ActionEventTypeCompleted ActionEventType = "STEP_EVENT_TYPE_COMPLETED" ActionEventTypeFailed ActionEventType = "STEP_EVENT_TYPE_FAILED" )
type ActionPayload ¶
type ActionPayload func(target interface{}) error
ActionPayload unmarshals the action payload into the target. It also validates the resulting target.
type ActionType ¶
type ActionType string
const ( ActionTypeStartStepRun ActionType = "START_STEP_RUN" ActionTypeCancelStepRun ActionType = "CANCEL_STEP_RUN" )
type AdminClient ¶
type Client ¶
type Client interface { Admin() AdminClient Dispatcher() DispatcherClient Event() EventClient }
type ClientOpt ¶
type ClientOpt func(*ClientOpts)
func InitWorkflows ¶
func InitWorkflows() ClientOpt
func WithHostPort ¶
func WithTenantId ¶
func WithWorkflows ¶
WithWorkflows sets the workflow files to use for the worker. If this is not passed in, the workflows files will be loaded from the .hatchet folder in the current directory.
type ClientOpts ¶
type ClientOpts struct {
// contains filtered or unexported fields
}
type DispatcherClient ¶
type DispatcherClient interface { GetActionListener(ctx context.Context, req *GetActionListenerRequest) (WorkerActionListener, error) SendActionEvent(ctx context.Context, in *ActionEvent) (*ActionEventResponse, error) }
type EventClient ¶
type GetActionListenerRequest ¶
TODO: add validator to client side
Click to show internal directories.
Click to hide internal directories.