Versions in this module Expand all Collapse all v1 v1.0.80 Jul 14, 2026 v1.0.79 Jul 14, 2026 Changes in this version + const LeaseDuration + func BackoffFor(attempts int) time.Duration + func BootUpdateDedupeKey(sessionID string) string + func Cancel(taskID string) error + func Claim(agentID bson.ObjectID, serverRunning bool) (*v2.AgentTaskSchema, error) + func Complete(taskID, leaseToken string) error + func Enqueue(agentID, accountID bson.ObjectID, action string, data interface{}, ...) (string, error) + func EnsureIndexes() error + func Fail(taskID, leaseToken, errMsg string) error + func FindByDedupeKey(agentID bson.ObjectID, dedupeKey string) (*v2.AgentTaskSchema, error) + func FindPendingByAction(agentID bson.ObjectID, action string) (*v2.AgentTaskSchema, error) + func Get(taskID string) (*v2.AgentTaskSchema, error) + func HasActiveAction(agentID bson.ObjectID, action string) (bool, error) + func InitAgentTaskService() error + func ListForAgent(agentID bson.ObjectID, limit int64) ([]v2.AgentTaskSchema, error) + func ReapExpiredLeases() error + func Release(taskID, leaseToken string) error + func RenewLease(taskID, leaseToken string) (bool, bool, error) + func ReplacePendingPayload(agentID bson.ObjectID, action string, data interface{}) (string, error) + func ReportProgress(taskID, leaseToken string, pct int32, msg string) error + func Retry(taskID string) error + func SetGate(taskID string, opts EnqueueOpts) (bool, error) + func ShutdownAgentTaskService() error + func StartDispatcher() + func StopDispatcher() + func WorkflowDedupeKey(workflowID bson.ObjectID, actionIdx int) string + type Assignment struct + Action string + Attempt int32 + Data string + LeaseSeconds int32 + LeaseToken string + MaxAttempts int32 + TaskID string + type EnqueueOpts struct + DependsOn *bson.ObjectID + ID *bson.ObjectID + RequiresServerStopped bool + type Registry struct + func GetRegistry() *Registry + func (r *Registry) Add(agentID bson.ObjectID) (<-chan Assignment, func()) + func (r *Registry) ConnectedAgents() []bson.ObjectID + func (r *Registry) Has(agentID bson.ObjectID) bool