Documentation
¶
Overview ¶
Package reference supplies an optional durable state implementation. It is not a scheduler; native hosts may implement tasks.Backend directly instead.
Index ¶
- type Options
- type Service
- func (s *Service) Cancel(ctx context.Context, owner tasks.Owner, id string) (tasks.Acknowledgement, error)
- func (s *Service) Complete(ctx context.Context, owner tasks.Owner, id string, result json.RawMessage) error
- func (s *Service) Create(ctx context.Context, owner tasks.Owner, caps schema.ClientCapabilities, ...) (tasks.CreateTaskResult, error)
- func (s *Service) Fail(ctx context.Context, owner tasks.Owner, id string, rpcError *tasks.RPCError) error
- func (s *Service) Get(ctx context.Context, owner tasks.Owner, id string) (tasks.GetTaskResult, error)
- func (s *Service) MarkCancelled(ctx context.Context, owner tasks.Owner, id string) error
- func (s *Service) Notification(ctx context.Context, owner tasks.Owner, id string) (tasks.TaskStatusNotification, error)
- func (s *Service) PrivateRecord(ctx context.Context, owner tasks.Owner, id string) (tasks.Record, error)
- func (s *Service) RequireInput(ctx context.Context, owner tasks.Owner, id string, ...) error
- func (s *Service) SetMetadata(ctx context.Context, owner tasks.Owner, id, message string, ...) error
- func (s *Service) Update(ctx context.Context, owner tasks.Owner, id string, ...) (tasks.Acknowledgement, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, owner tasks.Owner, caps schema.ClientCapabilities, options tasks.CreateOptions) (tasks.CreateTaskResult, error)
func (*Service) MarkCancelled ¶
MarkCancelled is called only after the existing executor confirms cancellation.
func (*Service) Notification ¶
func (*Service) PrivateRecord ¶
func (s *Service) PrivateRecord(ctx context.Context, owner tasks.Owner, id string) (tasks.Record, error)
PrivateRecord gives a trusted adapter its durable input/cancel/origin state.
func (*Service) RequireInput ¶
func (*Service) SetMetadata ¶
Click to show internal directories.
Click to hide internal directories.