Documentation ¶
Index ¶
- type Crow
- type Murder
- type RedisCrow
- func (c *RedisCrow) AddToQueue(groupName string, obj interface{}, ageConfigured bool)
- func (c *RedisCrow) ClearQueue(queueName string, groupID string) error
- func (c *RedisCrow) CreateLockKey(queueName string, lockKey string, TTL int) bool
- func (c *RedisCrow) CurrentQueue(groupName string) string
- func (c *RedisCrow) ExtendLockKey(lockKey string, TTL int)
- func (c *RedisCrow) FindQueueByKey(lockKey string) (string, bool)
- func (c *RedisCrow) GetQueueContents(queueName string) []string
- func (c *RedisCrow) GetReadyQueues(groupID string) []string
- func (c *RedisCrow) IsLocked(queueName string) bool
- func (c *RedisCrow) MoveToReady(groupName, newName string)
- func (c *RedisCrow) QueueSize(groupName string) int
- func (c *RedisCrow) QueueTimeSinceCreation(groupName string) int
- func (c *RedisCrow) RemoveLockKey(lockKey string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crow ¶
type Crow interface { QueueSize(string) int // Query main queue size QueueTimeSinceCreation(string) int // Query time since queue creation AddToQueue(string, interface{}, bool) // Add object to queue GetQueueContents(string) []string // Retrieve all contents of queue ClearQueue(string, string) error // Clear all queue contents CreateLockKey(string, string, int) bool // Create lock key for a queue, confirm if lock acquired, and set TTL IsLocked(string) bool // Check if a queue is locked FindQueueByKey(string) (string, bool) // Get the queue for a lock key if exists ExtendLockKey(string, int) // Extend TTL of lock key to value provided RemoveLockKey(string) // Removes a lock key if exists MoveToReady(string, string) // Move a queue to ready to process queues GetReadyQueues(string) []string // Get full queues }
Crow : Interface for any storage system for the orchestrator to use
type Murder ¶
type Murder struct {
// contains filtered or unexported fields
}
Murder : Orchestra for queueing systems Provides availability via introducing multiple queues, locking and clearing
func NewMurderWithAge ¶
func (*Murder) Ack ¶
Ack : Acknowledge processing of a queue lock extending its time to kill Useful for long running jobs
func (*Murder) AgeConfigured ¶
func (*Murder) Get ¶
Get : Get contents of a queue given its lock key Ensuring the worker locked the queue and acquired the lock key
func (*Murder) Lock ¶
Lock : Lock a queue returning a lock key that is needed for acknowledging the processing of the queue If no queue is ready to process, returns empty string and false
type RedisCrow ¶
type RedisCrow struct {
Redis *redis.Client
}
func (*RedisCrow) AddToQueue ¶
func (*RedisCrow) ClearQueue ¶
func (*RedisCrow) CreateLockKey ¶
func (*RedisCrow) CurrentQueue ¶
func (*RedisCrow) ExtendLockKey ¶
func (*RedisCrow) FindQueueByKey ¶
func (*RedisCrow) GetQueueContents ¶
func (*RedisCrow) GetReadyQueues ¶
func (*RedisCrow) MoveToReady ¶
func (*RedisCrow) QueueTimeSinceCreation ¶
func (*RedisCrow) RemoveLockKey ¶
Click to show internal directories.
Click to hide internal directories.