Documentation
¶
Index ¶
- Constants
- func SetDebugLogger(log Log)
- func SetErrorLogger(log Log)
- func SetHttpClient(client HttpClient)
- type BadRequestError
- type HttpClient
- type InternalError
- type Log
- type Message
- type MessageDontExistError
- type NoMessagesAvailableError
- type NotAuthorizedError
- type Properties
- type QueueClient
- type QueueDontExistError
Constants ¶
const Rfc2616Time = "Mon, 02 Jan 2006 15:04:05 MST"
Variables ¶
This section is empty.
Functions ¶
func SetDebugLogger ¶
func SetDebugLogger(log Log)
Sets the package's debug logger. Pass nil to disable debug logging.
func SetErrorLogger ¶
func SetErrorLogger(log Log)
Sets the package's error logger. Pass nil to disable error logging.
Types ¶
type BadRequestError ¶
func (BadRequestError) Error ¶
func (e BadRequestError) Error() string
type InternalError ¶
func (InternalError) Error ¶
func (e InternalError) Error() string
type Message ¶
type Message struct { ContentType string CorrelationId string SessionId string DeliveryCount int LockedUntilUtc time.Time LockToken string Id string Label string ReplyTo string EnqueuedTimeUtc time.Time SequenceNumber int64 TimeToLive int To string ScheduledEnqueueTimeUtc time.Time ReplyToSessionId string PartitionKey string Properties Properties Body []byte }
Queue Message.
See https://docs.microsoft.com/en-us/rest/api/servicebus/message-headers-and-properties
func NewMessage ¶
type MessageDontExistError ¶
func (MessageDontExistError) Error ¶
func (e MessageDontExistError) Error() string
type NoMessagesAvailableError ¶
func (NoMessagesAvailableError) Error ¶
func (e NoMessagesAvailableError) Error() string
type NotAuthorizedError ¶
func (NotAuthorizedError) Error ¶
func (e NotAuthorizedError) Error() string
type Properties ¶
Properties represents the key-value pairs of message properties.
func (Properties) Get ¶
func (p Properties) Get(key string) string
Get gets the first value associated with the given key. It is case insensitive; textproto.CanonicalMIMEHeaderKey is used to canonicalize the provided key. If there are no values associated with the key, Get returns "".
func (Properties) Set ¶
func (p Properties) Set(key, value string)
Set sets the header entries associated with key to the single element value. It replaces any existing values associated with key.
type QueueClient ¶
type QueueClient struct { // Service Bus Namespace e.g. https://<yournamespace>.servicebus.windows.net Namespace string // Policy name e.g. RootManageSharedAccessKey KeyName string // Policy value. KeyValue string // Name of the queue. QueueName string // Request timeout in seconds. Timeout int // contains filtered or unexported fields }
Thread-safe client for Azure Service Bus Queue.
func (*QueueClient) DeleteMessage ¶
func (q *QueueClient) DeleteMessage(msg *Message) error
This operation completes the processing of a locked message and deletes it from the queue or subscription. This operation should only be called after successfully processing a previously locked message, in order to maintain At-Least-Once delivery assurances.
For more information see https://docs.microsoft.com/en-us/rest/api/servicebus/delete-message
func (*QueueClient) GetMessage ¶
func (q *QueueClient) GetMessage() (*Message, error)
For more information see https://docs.microsoft.com/en-us/rest/api/servicebus/peek-lock-message-non-destructive-read
func (*QueueClient) SendMessage ¶
func (q *QueueClient) SendMessage(msg *Message) error
Sends message to a Service Bus queue.
func (*QueueClient) UnlockMessage ¶
func (q *QueueClient) UnlockMessage(msg *Message) error
Unlocks a message for processing by other receivers on a specified subscription. This operation deletes the lock object, causing the message to be unlocked. Before the operation is called, a receiver must first lock the message.
For more information see https://docs.microsoft.com/en-us/rest/api/servicebus/unlock-message
type QueueDontExistError ¶
func (QueueDontExistError) Error ¶
func (e QueueDontExistError) Error() string