util

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureEventHubClient

type AzureEventHubClient struct {
	NamespaceClient eventhub.NamespacesClient
	GroupClient     resources.GroupsClient
	HubClient       eventhub.EventHubsClient
	Hub             *eventhubs.Hub
}

func Connect

func Connect(ctx context.Context, subscriptionID, tenantID, clientID, clientSecret string) (*AzureEventHubClient, error)

Connect establishes connection with Azure.

func (*AzureEventHubClient) CreateOrUpdateHub

func (conn *AzureEventHubClient) CreateOrUpdateHub(ctx context.Context, name, region string) (*eventhubs.Hub, error)

CreateOrUpdateHub creates or updates hub with provided name and an Azure region It creates group, namespace and then hub and auth rule to connect to it.

func (*AzureEventHubClient) DeleteHub

func (conn *AzureEventHubClient) DeleteHub(ctx context.Context, name string) error

DeleteHub deletes whole group that results in deletion of hub, namespace and group this is implemented for consistency reasons. Deletion usually takes sometime to complete.

Jump to

Keyboard shortcuts

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