Documentation
¶
Index ¶
- Constants
- func DeepCopyItem(original map[string]QueueSpec) map[string]QueueSpec
- func DeepCopyThread(original map[string]bool) map[string]bool
- type Beanstalk
- type BeanstalkClientInterface
- type MockBeanstalkClientInterface
- type MockBeanstalkClientInterfaceMockRecorder
- type Poller
- type QueueSpec
- type Queues
- func (q *Queues) Add(namespace string, name string, uri string, workers int32, ...) error
- func (q *Queues) Delete(namespace string, name string) error
- func (q *Queues) GetQueueInfo(namespace string, name string) (string, int32, float64, int32)
- func (q *Queues) List(queueServiceName string) map[string]QueueSpec
- func (q *Queues) ListAll() map[string]QueueSpec
- func (q *Queues) ListQueue(key string) QueueSpec
- func (q *Queues) Sync(stopCh <-chan struct{})
- type QueuingService
- type SQS
Constants ¶
const ( BenanstalkProtocol = "beanstalk" UnsyncedQueueMessageCount = -1 UnsyncedMessagesSentPerMinute = -1 UnsyncedIdleWorkers = -1 )
const ( SqsQueueService = "sqs" BeanstalkQueueService = "beanstalkd" )
Variables ¶
This section is empty.
Functions ¶
func DeepCopyItem ¶ added in v0.1.2
Types ¶
type Beanstalk ¶ added in v1.0.0
type Beanstalk struct {
// contains filtered or unexported fields
}
Beanstalk is used to by the Poller to get the queue information from Beanstalk, it implements the QueuingService interface
type BeanstalkClientInterface ¶ added in v1.0.0
type BeanstalkClientInterface interface {
// contains filtered or unexported methods
}
func NewBeanstalkClient ¶ added in v1.0.0
func NewBeanstalkClient(queueURI string) (BeanstalkClientInterface, error)
type MockBeanstalkClientInterface ¶ added in v1.0.0
type MockBeanstalkClientInterface struct {
// contains filtered or unexported fields
}
MockBeanstalkClientInterface is a mock of BeanstalkClientInterface interface
func NewMockBeanstalkClientInterface ¶ added in v1.0.0
func NewMockBeanstalkClientInterface(ctrl *gomock.Controller) *MockBeanstalkClientInterface
NewMockBeanstalkClientInterface creates a new mock instance
func (*MockBeanstalkClientInterface) EXPECT ¶ added in v1.0.0
func (m *MockBeanstalkClientInterface) EXPECT() *MockBeanstalkClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockBeanstalkClientInterfaceMockRecorder ¶ added in v1.0.0
type MockBeanstalkClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockBeanstalkClientInterfaceMockRecorder is the mock recorder for MockBeanstalkClientInterface
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
Poller is the generic poller which manages polling of queues from the configured message queuing service provider
func NewPoller ¶
func NewPoller(queues *Queues, queueService QueuingService) *Poller
type QueueSpec ¶
type QueueSpec struct {
// contains filtered or unexported fields
}
QueueSpec is the specification for a single queue
type Queues ¶
type Queues struct {
// contains filtered or unexported fields
}
Queues maintains a list of all queues as specified in WPAs in memory The list is kept in sync with the wpa objects
func (*Queues) GetQueueInfo ¶
type QueuingService ¶
type QueuingService interface { // GetName returns the name of the queing service GetName() string // contains filtered or unexported methods }