eventhubs

package
v0.0.0-...-72b2b2c Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AzureEventHubManagers = EventHubManagers{
	EventHubNamespace: &azureEventHubNamespaceManager{},
	EventHub:          &azureEventHubManager{},
	ConsumerGroup:     &azureConsumerGroupManager{},
}

Functions

func NewConsumerGroupClient

func NewConsumerGroupClient(creds config.Credentials) *azureConsumerGroupManager

func NewEventHubNamespaceClient

func NewEventHubNamespaceClient(creds config.Credentials) *azureEventHubNamespaceManager

func NewEventhubClient

func NewEventhubClient(creds config.Credentials, secretClient secrets.SecretClient, scheme *runtime.Scheme) *azureEventHubManager

func ParseNetworkRules

func ParseNetworkRules(networkRule *v1alpha1.EventhubNamespaceNetworkRule) eventhub.NetworkRuleSet

ParseNetworkRules parses the network rules specified in the yaml and converts to the SDK struct

Types

type ConsumerGroupManager

type ConsumerGroupManager interface {
	// CreateConsumerGroup creates an Event Hub Consumer Group
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	// consumerGroupName - the consumer group name
	// parameters - parameters supplied to create or update a consumer group resource.
	CreateConsumerGroup(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (eventhub.ConsumerGroup, error)

	//GetConsumerGroup gets consumer group description for the specified Consumer Group.
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	// consumerGroupName - the consumer group name
	GetConsumerGroup(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (eventhub.ConsumerGroup, error)

	// DeleteConsumerGroup deletes an Event Hub Consumer Group
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	// consumerGroupName - the consumer group name
	DeleteConsumerGroup(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result autorest.Response, err error)

	// also embed async client methods
	resourcemanager.ARMClient
}

type EventHubManager

type EventHubManager interface {
	// DeleteHub deletes an Event Hub from the specified Namespace and resource group.
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	DeleteHub(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result autorest.Response, err error)

	// CreateHub creates an Event Hubs hub in a namespace
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	CreateHub(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, MessageRetentionInDays int32, PartitionCount int32, captureDescription *eventhub.CaptureDescription) (eventhub.Model, error)

	//GetHub gets an Event Hubs description for the specified Event Hub.
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	GetHub(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (eventhub.Model, error)

	// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub.
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	// authorizationRuleName - the authorization rule name.
	// parameters - the shared access AuthorizationRule.
	CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters eventhub.AuthorizationRule) (result eventhub.AuthorizationRule, err error)

	// ListKeys gets the ACS and SAS connection strings for the Event Hub.
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// eventHubName - the Event Hub name
	// authorizationRuleName - the authorization rule name.
	ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result eventhub.AccessKeys, err error)

	// also embed arm client methods
	resourcemanager.ARMClient
}

type EventHubManagers

type EventHubManagers struct {
	EventHubNamespace EventHubNamespaceManager
	EventHub          EventHubManager
	ConsumerGroup     ConsumerGroupManager
}

type EventHubNamespaceManager

type EventHubNamespaceManager interface {
	DeleteNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result autorest.Response, err error)

	// Get gets the description of the specified namespace.
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	GetNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result *eventhub.EHNamespace, err error)

	// CreateNamespaceAndWait creates an Event Hubs namespace
	// Parameters:
	// resourceGroupName - name of the resource group within the azure subscription.
	// namespaceName - the Namespace name
	// location - azure region
	CreateNamespaceAndWait(ctx context.Context, resourceGroupName string, namespaceName string, location string) (*eventhub.EHNamespace, error)

	// also embed arm client methods
	resourcemanager.ARMClient
}

Jump to

Keyboard shortcuts

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