Documentation
¶
Index ¶
- type AzureEventHubs
- func (aeh *AzureEventHubs) Close() (err error)
- func (aeh *AzureEventHubs) EventHubName() string
- func (aeh *AzureEventHubs) Init(metadata map[string]string) error
- func (aeh *AzureEventHubs) Publish(ctx context.Context, topic string, messages []*azeventhubs.EventData, ...) error
- func (aeh *AzureEventHubs) Subscribe(subscribeCtx context.Context, topic string, getAllProperties bool, ...) (err error)
- type AzureEventHubsMetadata
- type SubscribeHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureEventHubs ¶
type AzureEventHubs struct {
// contains filtered or unexported fields
}
AzureEventHubs allows sending/receiving Azure Event Hubs events. This is an abstract class used by both the pubsub and binding components.
func NewAzureEventHubs ¶
func NewAzureEventHubs(logger logger.Logger, isBinding bool) *AzureEventHubs
NewAzureEventHubs returns a new Azure Event hubs instance.
func (*AzureEventHubs) Close ¶
func (aeh *AzureEventHubs) Close() (err error)
func (*AzureEventHubs) EventHubName ¶
func (aeh *AzureEventHubs) EventHubName() string
EventHubName returns the parsed eventHub property from the metadata. It's used by the binding only.
func (*AzureEventHubs) Init ¶
func (aeh *AzureEventHubs) Init(metadata map[string]string) error
Init connects to Azure Event Hubs.
func (*AzureEventHubs) Publish ¶
func (aeh *AzureEventHubs) Publish(ctx context.Context, topic string, messages []*azeventhubs.EventData, batchOpts *azeventhubs.EventDataBatchOptions) error
Publish a batch of messages.
func (*AzureEventHubs) Subscribe ¶
func (aeh *AzureEventHubs) Subscribe(subscribeCtx context.Context, topic string, getAllProperties bool, handler SubscribeHandler) (err error)
Subscribe receives data from Azure Event Hubs in background.
type AzureEventHubsMetadata ¶ added in v1.11.0
type AzureEventHubsMetadata struct {
ConnectionString string `json:"connectionString" mapstructure:"connectionString"`
EventHubNamespace string `json:"eventHubNamespace" mapstructure:"eventHubNamespace"`
ConsumerID string `json:"consumerID" mapstructure:"consumerID"`
StorageConnectionString string `json:"storageConnectionString" mapstructure:"storageConnectionString"`
StorageAccountName string `json:"storageAccountName" mapstructure:"storageAccountName"`
StorageAccountKey string `json:"storageAccountKey" mapstructure:"storageAccountKey"`
StorageContainerName string `json:"storageContainerName" mapstructure:"storageContainerName"`
EnableEntityManagement bool `json:"enableEntityManagement,string" mapstructure:"enableEntityManagement"`
MessageRetentionInDays int32 `json:"messageRetentionInDays,string" mapstructure:"messageRetentionInDays"`
PartitionCount int32 `json:"partitionCount,string" mapstructure:"partitionCount"`
SubscriptionID string `json:"subscriptionID" mapstructure:"subscriptionID"`
ResourceGroupName string `json:"resourceGroupName" mapstructure:"resourceGroupName"`
// Binding only
EventHub string `json:"eventHub" mapstructure:"eventHub" only:"bindings"`
ConsumerGroup string `json:"consumerGroup" mapstructure:"consumerGroup" only:"bindings"` // Alias for ConsumerID
PartitionID string `json:"partitionID" mapstructure:"partitionID" only:"bindings"` // Deprecated
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.