Skip to content

Commit

Permalink
adding missing publisher alias
Browse files Browse the repository at this point in the history
  • Loading branch information
imiller31 committed Aug 10, 2021
1 parent d222c91 commit f65cffe
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions publisher/alias.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package publisher

import (
"context"
"time"

"github.com/Azure/go-autorest/autorest/adal"
"github.com/Azure/go-shuttle/publisher/topic"
)

// Deprecated: use topic package
type Publisher = topic.Publisher

// Deprecated: use topic package
type ManagementOption = topic.ManagementOption

// Deprecated: use topic package
type Option = topic.Option

// Deprecated: use topic package
func New(ctx context.Context, topicName string, opts ...ManagementOption) (*Publisher, error) {
return topic.New(ctx, topicName, opts...)
}

// Deprecated: use topic package
func WithConnectionString(connStr string) ManagementOption {
return topic.WithConnectionString(connStr)
}

// Deprecated: use topic package
func WithEnvironmentName(environmentName string) ManagementOption {
return topic.WithEnvironmentName(environmentName)
}

// Deprecated: use topic package
func WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption {
return topic.WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID)
}

// Deprecated: use topic package
func WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID string) ManagementOption {
return topic.WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID)
}

// Deprecated: use topic package
func WithToken(serviceBusNamespaceName string, spt *adal.ServicePrincipalToken) ManagementOption {
return topic.WithToken(serviceBusNamespaceName, spt)
}

// Deprecated: use topic package
func SetDefaultHeader(headerName, msgKey string) ManagementOption {
return topic.SetDefaultHeader(headerName, msgKey)
}

// Deprecated: use topic package
func WithDuplicateDetection(window *time.Duration) ManagementOption {
return topic.WithDuplicateDetection(window)
}

// Deprecated: use topic package
func SetMessageDelay(delay time.Duration) Option {
return topic.SetMessageDelay(delay)
}

// Deprecated: use topic package
func SetMessageID(messageID string) Option {
return topic.SetMessageID(messageID)
}

// SetCorrelationID sets the SetCorrelationID of the message.
func SetCorrelationID(correlationID string) Option {
return topic.SetCorrelationID(correlationID)
}

0 comments on commit f65cffe

Please sign in to comment.