Documentation
¶
Overview ¶
Package asbclient is a client for Azure Service Bus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSubscriptionRequired = fmt.Errorf("A subscription is required for Service Bus Topic operations")
ErrSubscriptionRequired is raised when a service bus topics operations is performed without a subscription.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
DeleteMessage(item *Message) error
PeekLockMessage(path string, timeout int) (*Message, error)
Send(path string, item *MessageReq) error
SetSubscription(subscription string)
Unlock(item *Message) error
}
Client is a client for Azure Service Bus (queues and topics). You should use a different client instance for every namespace. For more comprehensive documentation on its various methods, see:
https://msdn.microsoft.com/en-us/library/azure/hh780717.aspx
type ClientType ¶
type ClientType int
ClientType denotes the type of client (topic/queue) that is required
const ( //Queue is a client type for Azure Service Bus queues Queue ClientType = iota //Topic is a client type for Azure Service Bus topics Topic ClientType = iota )
type MessageReq ¶
type MessageReq struct {
ContentType string `json:",omitempty"`
CorrelationId string `json:",omitempty"`
SessionID string `json:"SessionId,omitempty"`
Label string `json:",omitempty"`
ReplyTo string `json:",omitempty"`
// TODO: Time span...
// TimeToLive string `json:",omitempty"`
To string `json:",omitempty"`
ScheduledEnqueueTimeUtc Time `json:",omitempty"`
ReplyToSessionId string `json:",omitempty"`
PartitionKey string `json:",omitempty"`
Body []byte `json:"-"`
}
Message is an Azure Service Bus message
type Time ¶
Time is a wrapper round time.Time to json encode/decode in RFC1123 fomat
func (*Time) UnmarshalJSON ¶
UnmarshalJSON from RFC1123
Click to show internal directories.
Click to hide internal directories.