Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inspector ¶ added in v1.74.1
type Inspector interface {
ListPublishers() []PublisherInfo
ListSubscribers() []SubscriberInfo
}
type Manager ¶
type Manager interface {
AddPublisher(ctx context.Context, reference string, queueURL string) error
GetPublisher(reference string) (Publisher, error)
DiscardPublisher(ctx context.Context, reference string) error
AddSubscriber(
ctx context.Context,
reference string,
queueURL string,
handlers ...SubscribeWorker,
) error
DiscardSubscriber(ctx context.Context, reference string) error
GetSubscriber(reference string) (Subscriber, error)
Publish(ctx context.Context, reference string, payload any, headers ...map[string]string) error
Init(ctx context.Context) error
Close(ctx context.Context) error
}
func NewQueueManager ¶
func NewQueueManager(_ context.Context, workPool workerpool.Manager) Manager
type PublisherInfo ¶ added in v1.74.1
type SubscribeWorker ¶
type Subscriber ¶
type SubscriberInfo ¶ added in v1.74.1
type SubscriberInfo struct {
Reference string `json:"reference"`
URL string `json:"url"`
State SubscriberState `json:"state"`
Initiated bool `json:"initiated"`
}
type SubscriberMetrics ¶
type SubscriberMetrics interface {
IsIdle(state SubscriberState) bool
IdleTime(state SubscriberState) time.Duration
AverageProcessingTime() time.Duration
}
type SubscriberState ¶
type SubscriberState int
const ( SubscriberStateWaiting SubscriberState = iota SubscriberStateProcessing SubscriberStateInError )
Click to show internal directories.
Click to hide internal directories.