azurequeuestorage

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AzureQueuePollingInterval is the polling interval (default is 1 minute).
	AzureQueuePollingInterval = time.Minute
	// AzureQueueRetryLimit is the limit for attempts to retry invoking a function.
	AzureQueueRetryLimit = 3
	// AzureMessageFetchCount is the number of messages to fetch at a time.
	AzureMessageFetchCount = 10
	// AzureMessageVisibilityTimeout is the visibility timeout for dequeued messages.
	AzureMessageVisibilityTimeout = time.Minute
	// AzurePoisonQueueSuffix is the suffix used for poison queues.
	AzurePoisonQueueSuffix = "-poison"
	// AzureFunctionInvocationTimeout is the amount of time to wait for a triggered function to execute.
	AzureFunctionInvocationTimeout = 10 * time.Minute
)

TODO: some of these constants should probably be environment variables

Variables

This section is empty.

Functions

func IsTopicValid

func IsTopicValid(topic string) bool

func New

func New(logger *zap.Logger, mqCfg messageQueue.Config, routerUrl string) (messageQueue.MessageQueue, error)

Types

type AzureHTTPClient

type AzureHTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

AzureHTTPClient is the interface that abstract HTTP requests made by the trigger. This exists to enable unit testing.

type AzureMessage

type AzureMessage interface {
	Bytes() []byte
	Put(options *storage.PutMessageOptions) error
	Delete(options *storage.QueueServiceOptions) error
}

AzureMessage is the interface that abstracts Azure storage messages. This exists to enable unit testing.

type AzureQueue

type AzureQueue interface {
	Create(options *storage.QueueServiceOptions) error
	NewMessage(text string) AzureMessage
	GetMessages(options *storage.GetMessagesOptions) ([]AzureMessage, error)
}

AzureQueue is the interface that abstracts Azure storage queues. This exists to enable unit testing.

type AzureQueueService

type AzureQueueService interface {
	GetQueue(name string) AzureQueue
}

AzureQueueService is the interface that abstracts the Azure storage service. This exists to enable unit testing.

type AzureQueueSubscription

type AzureQueueSubscription struct {
	// contains filtered or unexported fields
}

AzureQueueSubscription represents an Azure storage message queue subscription.

type AzureStorageConnection

type AzureStorageConnection struct {
	// contains filtered or unexported fields
}

AzureStorageConnection represents an Azure storage connection.

func (AzureStorageConnection) Subscribe

func (AzureStorageConnection) Unsubscribe

func (asc AzureStorageConnection) Unsubscribe(subscription messageQueue.Subscription) error

type Factory

type Factory struct{}

func (*Factory) Create

func (factory *Factory) Create(logger *zap.Logger, mqCfg messageQueue.Config, routerUrl string) (messageQueue.MessageQueue, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL