Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Embedded ¶
type Embedded struct { Config EmbeddedConfig // contains filtered or unexported fields }
Embedded is the Queue implementation using an in-memory circular buffer.
func NewEmbedded ¶
func NewEmbedded(cfg EmbeddedConfig) *Embedded
type EmbeddedConfig ¶
func NewEmbeddedConfig ¶
func NewEmbeddedConfig() EmbeddedConfig
type Queue ¶
type Queue interface { // Push appends a set of tasks into the queue. If FIFO, task will be appended at the tail. If LIFO, task will be appended // at the head. Push(ctx context.Context, task ...boltzmann.Task) error // Pop retrieves several tasks from the queue. Pop(ctx context.Context) ([]boltzmann.Task, error) }
type RedisList ¶
type RedisList struct { Client *redis.Client Codec codec.Codec Config RedisListConfig }
RedisList is the Redis implementation of queue.Service using redis lists (First-In First-Out or Last-In First-Out).
func NewRedisList ¶
func NewRedisList(cfg RedisListConfig, cod codec.Codec, c *redis.Client) RedisList
type RedisListConfig ¶
func NewRedisListConfig ¶
func NewRedisListConfig() RedisListConfig
type Service ¶
type Service struct { Config ServiceConfig Queue Queue AgentRegistry agent.Registry // contains filtered or unexported fields }
func NewService ¶
func NewService(cfg ServiceConfig, agentReg agent.Registry, queue Queue) *Service
type ServiceConfig ¶
type ServiceConfig struct { FetchInterval time.Duration RetryInterval time.Duration JobTimeout time.Duration MaxRetries int8 MaxProc int64 }
func NewServiceConfig ¶
func NewServiceConfig() ServiceConfig
type StateUpdaterMiddleware ¶
type StateUpdaterMiddleware struct { Repository state.Repository Next Queue }
Click to show internal directories.
Click to hide internal directories.