Documentation ¶
Index ¶
- type ManagementOption
- func SetDefaultHeader(headerName, msgKey string) ManagementOption
- func WithConnectionString(connStr string) ManagementOption
- func WithDuplicateDetection(window *time.Duration) ManagementOption
- func WithEnvironmentName(environmentName string) ManagementOption
- func WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID string) ManagementOption
- func WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption
- func WithToken(serviceBusNamespaceName string, spt *adal.ServicePrincipalToken) ManagementOption
- type Option
- type Publisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManagementOption ¶
ManagementOption provides structure for configuring a new Publisher
func SetDefaultHeader ¶
func SetDefaultHeader(headerName, msgKey string) ManagementOption
SetDefaultHeader adds a header to every message published using the value specified from the message body
func WithConnectionString ¶
func WithConnectionString(connStr string) ManagementOption
WithConnectionString configures a publisher with the information provided in a Service Bus connection string
func WithDuplicateDetection ¶
func WithDuplicateDetection(window *time.Duration) ManagementOption
SetDuplicateDetection guarantees that the topic will have exactly-once delivery over a user-defined span of time. Defaults to 30 seconds with a maximum of 7 days
func WithEnvironmentName ¶
func WithEnvironmentName(environmentName string) ManagementOption
WithEnvironmentName configures the azure environment used to connect to Servicebus. The environment value used is then provided by Azure/go-autorest. ref: https://github.com/Azure/go-autorest/blob/c7f947c0610de1bc279f76e6d453353f95cd1bfa/autorest/azure/environments.go#L34
func WithManagedIdentityClientID ¶
func WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID string) ManagementOption
WithManagedIdentityClientID configures a publisher with the attached managed identity and the Service bus resource name
func WithManagedIdentityResourceID ¶
func WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption
WithManagedIdentityResourceID configures a publisher with the attached managed identity and the Service bus resource name
func WithToken ¶
func WithToken(serviceBusNamespaceName string, spt *adal.ServicePrincipalToken) ManagementOption
type Option ¶
type Option func(msg *servicebus.Message) error
Option provides structure for configuring when starting to publish to a specified topic
func SetCorrelationID ¶
SetCorrelationID sets the SetCorrelationID of the message.
func SetMessageDelay ¶
SetMessageDelay schedules a message in the future
func SetMessageID ¶
SetMessageID sets the messageID of the message. Used for duplication detection
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher is a struct to contain service bus entities relevant to publishing to a topic
func (*Publisher) Namespace ¶
func (p *Publisher) Namespace() *servicebus.Namespace