github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/kit/mq/task_state.go (about)

     1  package mq
     2  
     3  //go:generate toolkit gen enum TaskState
     4  type TaskState uint8
     5  
     6  const (
     7  	TASK_STATE_UNKNOWN TaskState = iota
     8  	TASK_STATE__SUCCEEDED
     9  	TASK_STATE__FAILED
    10  )
    11  
    12  var TASK_STATE__PENDING = TASK_STATE_UNKNOWN
    13  
    14  func (v TaskState) State() TaskState { return v }
    15  
    16  func (v *TaskState) SetState(s TaskState) { *v = s }