Documentation ¶
Index ¶
- type Job
- func (s *Job) Custom(name string, body string) *Job
- func (s *Job) Done() *Job
- func (s *Job) DoneWithMessage(msg string) *Job
- func (s *Job) Download(url string) *Job
- func (s *Job) Error(err error) error
- func (s *Job) InProgress(message string) *Job
- func (s *Job) Info(message string) *Job
- func (s *Job) ObserveLog() *Observer
- func (s *Job) Redirect(url string) *Job
- func (s *Job) RenderTemplate(name string, body string) *Job
- func (s *Job) Run(ctx context.Context) error
- func (s *Job) StatusUpdate(status string) *Job
- func (s *Job) Warn(err error, message string) *Job
- type Jobs
- type LogItem
- type LogItemLevel
- type NilStorage
- func (s *NilStorage) Drop(_ context.Context, _ string) (err error)
- func (s *NilStorage) GetState(_ context.Context, _ string) (state *State, ok bool, err error)
- func (s *NilStorage) Pub(_ context.Context, _ string, _ LogItem) error
- func (s *NilStorage) Sub(_ context.Context, _ string) (res chan LogItem, err error)
- type Observer
- type Queues
- type Redis
- func (s *Redis) Drop(ctx context.Context, id string) (err error)
- func (s *Redis) GetState(ctx context.Context, id string) (state *State, ok bool, err error)
- func (s *Redis) Pub(ctx context.Context, id string, l LogItem) (err error)
- func (s *Redis) Sub(ctx context.Context, id string) (res chan LogItem, err error)
- type Runnable
- type Script
- type State
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { ID string Queue string Context context.Context // contains filtered or unexported fields }
func (*Job) DoneWithMessage ¶
func (*Job) InProgress ¶
func (*Job) ObserveLog ¶
func (*Job) StatusUpdate ¶
type LogItem ¶
type LogItem struct { Level LogItemLevel `json:"level,omitempty"` Message string `json:"message,omitempty"` Status string `json:"status,omitempty"` Tag string `json:"tag,omitempty"` Location string `json:"location,omitempty"` Template string `json:"template,omitempty"` Body string `json:"body,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` }
type LogItemLevel ¶
type LogItemLevel string
const ( Info LogItemLevel = "info" Error LogItemLevel = "error" Warn LogItemLevel = "warn" Done LogItemLevel = "done" InProgress LogItemLevel = "inprogress" Redirect LogItemLevel = "redirect" Download LogItemLevel = "download" RenderTemplate LogItemLevel = "rendertemplate" Custom LogItemLevel = "custom" StatusUpdate LogItemLevel = "statusupdate" Close LogItemLevel = "close" Open LogItemLevel = "open" )
type Observer ¶
func NewObserver ¶
func NewObserver() *Observer
type Queues ¶
type Queues struct {
// contains filtered or unexported fields
}
func (Queues) GetOrCreate ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
type Storage ¶
type Storage interface { Pub(ctx context.Context, id string, l LogItem) error Sub(ctx context.Context, id string) (res chan LogItem, err error) GetState(ctx context.Context, id string) (state *State, ok bool, err error) Drop(ctx context.Context, id string) (err error) }
func NewStorage ¶
func NewStorage(rc *cs.RedisClient, prefix string) Storage
Click to show internal directories.
Click to hide internal directories.