-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add aliases to support existing users on next release (#63)
* adding alias for publishers * adding listener alias
- Loading branch information
Showing
3 changed files
with
239 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package listener | ||
|
||
import ( | ||
"time" | ||
|
||
servicebus "github.com/Azure/azure-service-bus-go" | ||
"github.com/Azure/go-autorest/autorest/adal" | ||
topic "github.com/Azure/go-shuttle/topic/listener" | ||
) | ||
|
||
// Deprecated: use topic package | ||
type Listener = topic.Listener | ||
|
||
// Deprecated: use topic package | ||
type Option = topic.Option | ||
|
||
// Deprecated: use topic package | ||
type ManagementOption = topic.ManagementOption | ||
|
||
// Deprecated: use topic package | ||
func New(opts ...ManagementOption) (*Listener, error) { | ||
return topic.New(opts...) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithMessageLockAutoRenewal(interval time.Duration) Option { | ||
return topic.WithMessageLockAutoRenewal(interval) | ||
} | ||
|
||
// 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 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 WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption { | ||
return topic.WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithSubscriptionDetails(lock time.Duration, maxDelivery int32) ManagementOption { | ||
return topic.WithSubscriptionDetails(lock, maxDelivery) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithLockDuration(lock time.Duration) ManagementOption { | ||
return topic.WithLockDuration(lock) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithMaxDeliveryCount(maxDelivery int32) ManagementOption { | ||
return topic.WithMaxDeliveryCount(maxDelivery) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithPrefetchCount(prefetch uint32) Option { | ||
return topic.WithPrefetchCount(prefetch) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithMaxConcurrency(concurrency int) Option { | ||
return topic.WithMaxConcurrency(concurrency) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithSubscriptionName(name string) ManagementOption { | ||
return topic.WithSubscriptionName(name) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithFilterDescriber(filterName string, filter servicebus.FilterDescriber) ManagementOption { | ||
return topic.WithFilterDescriber(filterName, filter) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithTypeFilter(event interface{}) ManagementOption { | ||
return topic.WithTypeFilter(event) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package queue | ||
|
||
import ( | ||
"context" | ||
"time" | ||
|
||
"github.com/Azure/go-autorest/autorest/adal" | ||
queue "github.com/Azure/go-shuttle/queue/publisher" | ||
) | ||
|
||
// Deprecated: use queue package | ||
type Publisher = queue.Publisher | ||
|
||
// Deprecated: use queue package | ||
type ManagementOption = queue.ManagementOption | ||
|
||
// Deprecated: use queue package | ||
type Option = queue.Option | ||
|
||
// Deprecated: use queue package | ||
func New(ctx context.Context, topicName string, opts ...ManagementOption) (*Publisher, error) { | ||
return New(ctx, topicName, opts...) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func WithConnectionString(connStr string) ManagementOption { | ||
return WithConnectionString(connStr) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func WithEnvironmentName(environmentName string) ManagementOption { | ||
return WithEnvironmentName(environmentName) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption { | ||
return WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID string) ManagementOption { | ||
return WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func WithToken(serviceBusNamespaceName string, spt *adal.ServicePrincipalToken) ManagementOption { | ||
return WithToken(serviceBusNamespaceName, spt) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func SetDefaultHeader(headerName, msgKey string) ManagementOption { | ||
return SetDefaultHeader(headerName, msgKey) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func WithDuplicateDetection(window *time.Duration) ManagementOption { | ||
return WithDuplicateDetection(window) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func SetMessageDelay(delay time.Duration) Option { | ||
return SetMessageDelay(delay) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func SetMessageID(messageID string) Option { | ||
return SetMessageID(messageID) | ||
} | ||
|
||
// Deprecated: use queue package | ||
func SetCorrelationID(correlationID string) Option { | ||
return SetCorrelationID(correlationID) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package topic | ||
|
||
import ( | ||
"context" | ||
"time" | ||
|
||
"github.com/Azure/go-autorest/autorest/adal" | ||
topic "github.com/Azure/go-shuttle/topic/publisher" | ||
) | ||
|
||
// 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 New(ctx, topicName, opts...) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithConnectionString(connStr string) ManagementOption { | ||
return WithConnectionString(connStr) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithEnvironmentName(environmentName string) ManagementOption { | ||
return WithEnvironmentName(environmentName) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption { | ||
return WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID string) ManagementOption { | ||
return WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithToken(serviceBusNamespaceName string, spt *adal.ServicePrincipalToken) ManagementOption { | ||
return WithToken(serviceBusNamespaceName, spt) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func SetDefaultHeader(headerName, msgKey string) ManagementOption { | ||
return SetDefaultHeader(headerName, msgKey) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func WithDuplicateDetection(window *time.Duration) ManagementOption { | ||
return WithDuplicateDetection(window) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func SetMessageDelay(delay time.Duration) Option { | ||
return SetMessageDelay(delay) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func SetMessageID(messageID string) Option { | ||
return SetMessageID(messageID) | ||
} | ||
|
||
// Deprecated: use topic package | ||
func SetCorrelationID(correlationID string) Option { | ||
return SetCorrelationID(correlationID) | ||
} |