Documentation ¶
Index ¶
- func SerializeHttpPayload(ctx echo.Context) (*types.TaskPayload, error)
- type Dispatcher
- func (d *Dispatcher) Claim(ctx context.Context, workspaceName, stubId, taskId, containerId string) error
- func (d *Dispatcher) Complete(ctx context.Context, workspaceName, stubId, taskId string) error
- func (d *Dispatcher) Register(executor string, ...)
- func (d *Dispatcher) Retrieve(ctx context.Context, workspaceName, stubId, taskId string) (types.TaskInterface, error)
- func (d *Dispatcher) RetryTask(ctx context.Context, task types.TaskInterface) error
- func (d *Dispatcher) Send(ctx context.Context, executor string, authInfo *auth.AuthInfo, stubId string, ...) (types.TaskInterface, error)
- func (d *Dispatcher) SendAndExecute(ctx context.Context, executor string, authInfo *auth.AuthInfo, stubId string, ...) (types.TaskInterface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SerializeHttpPayload ¶
func SerializeHttpPayload(ctx echo.Context) (*types.TaskPayload, error)
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(ctx context.Context, taskRepo repository.TaskRepository) (*Dispatcher, error)
func (*Dispatcher) Claim ¶
func (d *Dispatcher) Claim(ctx context.Context, workspaceName, stubId, taskId, containerId string) error
func (*Dispatcher) Complete ¶
func (d *Dispatcher) Complete(ctx context.Context, workspaceName, stubId, taskId string) error
func (*Dispatcher) Register ¶
func (d *Dispatcher) Register(executor string, taskFactory func(ctx context.Context, message types.TaskMessage) (types.TaskInterface, error))
func (*Dispatcher) Retrieve ¶
func (d *Dispatcher) Retrieve(ctx context.Context, workspaceName, stubId, taskId string) (types.TaskInterface, error)
func (*Dispatcher) RetryTask ¶
func (d *Dispatcher) RetryTask(ctx context.Context, task types.TaskInterface) error
func (*Dispatcher) Send ¶
func (d *Dispatcher) Send(ctx context.Context, executor string, authInfo *auth.AuthInfo, stubId string, payload *types.TaskPayload, policy types.TaskPolicy) (types.TaskInterface, error)
func (*Dispatcher) SendAndExecute ¶
func (d *Dispatcher) SendAndExecute(ctx context.Context, executor string, authInfo *auth.AuthInfo, stubId string, payload *types.TaskPayload, policy types.TaskPolicy) (types.TaskInterface, error)
Click to show internal directories.
Click to hide internal directories.