Documentation
¶
Index ¶
- Variables
- type DBWorkflow
- type FirestoreEngine
- func (fs FirestoreEngine) Checkpoint(ctx context.Context, wf DBWorkflow, s async.WorkflowState) func(bool) error
- func (fs FirestoreEngine) Get(ctx context.Context, id string) (*DBWorkflow, error)
- func (fs FirestoreEngine) Lock(ctx context.Context, id string) (DBWorkflow, error)
- func (fs FirestoreEngine) OnCallback(ctx context.Context, id string, cb async.CallbackRequest, input interface{}) (interface{}, error)
- func (fs FirestoreEngine) OnResume(ctx context.Context, id string) error
- func (fs FirestoreEngine) ScheduleAndCreate(ctx context.Context, id, name string, state interface{}) error
- func (fs FirestoreEngine) Unlock(ctx context.Context, id string) error
- type GTasksScheduler
- type Request
- type TimeoutHandler
- func (t *TimeoutHandler) Handle(ctx context.Context, req async.CallbackRequest, input interface{}) (interface{}, error)
- func (t *TimeoutHandler) Setup(ctx context.Context, req async.CallbackRequest) error
- func (t *TimeoutHandler) Teardown(ctx context.Context, req async.CallbackRequest) error
- func (t *TimeoutHandler) Type() string
- type TimeoutMgr
- func (t *TimeoutMgr) Delay(dur time.Duration) *TimeoutHandler
- func (mgr *TimeoutMgr) Setup(ctx context.Context, req async.CallbackRequest) error
- func (t *TimeoutMgr) Teardown(ctx context.Context, req async.CallbackRequest) error
- func (mgr *TimeoutMgr) TimeoutHandler(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeoutTypeName = "gsched-timeout"
Functions ¶
This section is empty.
Types ¶
type DBWorkflow ¶
type FirestoreEngine ¶
type FirestoreEngine struct { Scheduler *GTasksScheduler Runner async.Runner DB *firestore.Client Collection string Workflows map[string]func() async.WorkflowState }
func (FirestoreEngine) Checkpoint ¶
func (fs FirestoreEngine) Checkpoint(ctx context.Context, wf DBWorkflow, s async.WorkflowState) func(bool) error
func (FirestoreEngine) Get ¶
func (fs FirestoreEngine) Get(ctx context.Context, id string) (*DBWorkflow, error)
func (FirestoreEngine) Lock ¶
func (fs FirestoreEngine) Lock(ctx context.Context, id string) (DBWorkflow, error)
func (FirestoreEngine) OnCallback ¶
func (fs FirestoreEngine) OnCallback(ctx context.Context, id string, cb async.CallbackRequest, input interface{}) (interface{}, error)
func (FirestoreEngine) OnResume ¶
func (fs FirestoreEngine) OnResume(ctx context.Context, id string) error
func (FirestoreEngine) ScheduleAndCreate ¶
func (fs FirestoreEngine) ScheduleAndCreate(ctx context.Context, id, name string, state interface{}) error
type GTasksScheduler ¶
type GTasksScheduler struct { Engine *FirestoreEngine C *cloudtasks.Service Collection string ProjectID string LocationID string QueueName string ResumeURL string }
func (*GTasksScheduler) ResumeHandler ¶
func (s *GTasksScheduler) ResumeHandler(w http.ResponseWriter, r *http.Request)
type Request ¶
type Request struct { ID string Req *async.CallbackRequest }
type TimeoutHandler ¶
func (*TimeoutHandler) Handle ¶
func (t *TimeoutHandler) Handle(ctx context.Context, req async.CallbackRequest, input interface{}) (interface{}, error)
func (*TimeoutHandler) Setup ¶ added in v0.5.3
func (t *TimeoutHandler) Setup(ctx context.Context, req async.CallbackRequest) error
func (*TimeoutHandler) Teardown ¶ added in v0.5.3
func (t *TimeoutHandler) Teardown(ctx context.Context, req async.CallbackRequest) error
func (*TimeoutHandler) Type ¶
func (t *TimeoutHandler) Type() string
type TimeoutMgr ¶
type TimeoutMgr struct { Engine *FirestoreEngine C *cloudtasks.Service Collection string ProjectID string LocationID string QueueName string CallbackURL string }
func (*TimeoutMgr) Delay ¶ added in v0.5.3
func (t *TimeoutMgr) Delay(dur time.Duration) *TimeoutHandler
func (*TimeoutMgr) Setup ¶
func (mgr *TimeoutMgr) Setup(ctx context.Context, req async.CallbackRequest) error
func (*TimeoutMgr) Teardown ¶
func (t *TimeoutMgr) Teardown(ctx context.Context, req async.CallbackRequest) error
func (*TimeoutMgr) TimeoutHandler ¶
func (mgr *TimeoutMgr) TimeoutHandler(w http.ResponseWriter, r *http.Request)