Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v1.2.0
type Client struct {
// contains filtered or unexported fields
}
Client represents a queue service.
func NewClient ¶ added in v1.2.0
NewClient creates a new Azure Queue Service. It is configured via the supplied Config. The config can contain a different AzureServiceURL to use for the service, this is useful for testing.
func (*Client) CreateQueue ¶ added in v1.2.0
CreateQueue creates a new queue with the given name.
func (*Client) DeleteQueue ¶ added in v1.2.0
DeleteQueue deletes the queue with the given name.
type Config ¶
type Config struct { AccountName string AccountKey string // AzureServiceURL is optional to override the default Azure Service URL. AzureServiceURL string }
Config is a set of configuration options for the Azure Queue Service.
type Queue ¶
type Queue interface { // MessageCount returns an approximate number of messages in the queue. MessageCount(ctx context.Context) (int, error) // Enqueue adds a message to the queue. The timeout represents how long the message // should be hidden from consumers. The ttl is how long the message should be kept // in the queue. Pass -time.Second for infinite lifetime. Enqueue(ctx context.Context, message string, timeout, ttl time.Duration) (*Message, error) // Dequeue removes a message from the queue. The timeout represents how long the // message should be hidden from consumers. If the message is not deleted, it will // reappear in the queue after the timeout. Dequeue(ctx context.Context, count int, timeout time.Duration) ([]*Message, error) // Peek returns the next set of messages in the queue without removing it. The count // represents how many messages to return. Peek(ctx context.Context, count int) ([]*Message, error) // Delete removes the message from the queue. Delete(ctx context.Context, m *Message) error }
Queue represents a queue in Azure Storage. It provides a core set of operations to interact with a queue.
Click to show internal directories.
Click to hide internal directories.