azureeventgridsource

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 46 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// ReasonSystemTopicSynced indicates that a system topic was created or updated.
	ReasonSystemTopicSynced = "SystemTopicSynced"
	// ReasonSystemTopicFinalized indicates that a system topic was finalized.
	ReasonSystemTopicFinalized = "SystemTopicFinalized"
	// ReasonFailedSystemTopic indicates a failure while synchronizing a system topic.
	ReasonFailedSystemTopic = "FailedSystemTopic"

	// ReasonSubscribed indicates that an event subscription was created or updated inside a system topic.
	ReasonSubscribed = "Subscribed"
	// ReasonUnsubscribed indicates that an event subscription was removed from a system topic.
	ReasonUnsubscribed = "Unsubscribed"
	// ReasonFailedSubscribe indicates a failure while synchronizing an event subscription in a system topic.
	ReasonFailedSubscribe = "FailedSubscribe"
	// ReasonFailedUnsubscribe indicates a failure while removing an event subscription from a system topic.
	ReasonFailedUnsubscribe = "FailedUnsubscribe"

	// ReasonEventHubCreated indicates that an Event Hub was created for receiving events.
	ReasonEventHubCreated = "EventHubCreated"
	// ReasonEventHubDeleted indicates that an Event Hub used for receiving events was deleted.
	ReasonEventHubDeleted = "EventHubDeleted"
	// ReasonFailedEventHub indicates a failure while synchronizing the Event Hub for receiving events.
	ReasonFailedEventHub = "FailedEventHub"

	// ReasonResourceGroupCreated indicates that a resource group was created.
	ReasonResourceGroupCreated = "ResourceGroupCreated"
	// ReasonFailedEventHub indicates a failure while synchronizing a resource group.
	ReasonFailedResourceGroup = "FailedResourceGroup"
)

Variables

This section is empty.

Functions

func EnsureEventHub added in v1.23.1

func EnsureEventHub(ctx context.Context, cli eventgrid.EventHubsClient) (string, error)

EnsureEventHub ensures the existence of an Event Hub for sending events. Required permissions:

  • Microsoft.EventHub/namespaces/eventhubs/read
  • Microsoft.EventHub/namespaces/eventhubs/write

func EnsureEventSubscription added in v1.23.1

func EnsureEventSubscription(ctx context.Context, cli eventgrid.EventSubscriptionsClient,
	sysTopicResID *v1alpha1.AzureResourceID, eventHubResID string) error

EnsureEventSubscription ensures an event subscription exists with the expected configuration. Required permissions:

  • Microsoft.EventGrid/systemTopics/eventSubscriptions/read
  • Microsoft.EventGrid/systemTopics/eventSubscriptions/write
  • Microsoft.EventHub/namespaces/eventhubs/write

func EnsureNoEventHub added in v1.23.1

func EnsureNoEventHub(ctx context.Context, cli eventgrid.EventHubsClient) error

EnsureNoEventHub ensures that the Event Hub created for sending events is deleted. Required permissions:

  • Microsoft.EventHub/namespaces/eventhubs/delete

func EnsureNoEventSubscription added in v1.23.1

func EnsureNoEventSubscription(ctx context.Context, cli eventgrid.EventSubscriptionsClient,
	sysTopic *azureeventgrid.SystemTopic) reconciler.Event

EnsureNoEventSubscription ensures the event subscription is removed. Required permissions:

  • Microsoft.EventGrid/systemTopics/eventSubscriptions/delete

func EnsureNoSystemTopic added in v1.23.1

EnsureNoSystemTopic ensures the system topic is removed. Required permissions:

  • Microsoft.EventGrid/systemTopics/read
  • Microsoft.EventGrid/systemTopics/delete

func EnsureSystemTopic added in v1.23.1

EnsureSystemTopic ensures a system topic exists with the expected configuration. Required permissions:

  • Microsoft.EventGrid/systemTopics/read
  • Microsoft.EventGrid/systemTopics/write To manage the default resource group, when the scope is an Azure subscription:
  • Microsoft.Resources/subscriptions/resourceGroups/read
  • Microsoft.Resources/subscriptions/resourceGroups/write Additionally, for regional resources, "read" permission on the resource (scope).

func FindSystemTopic added in v1.23.1

FindSystemTopic returns the system topic that matches the scope of the given source, if such system topic exists. If no system topic matches the description, nil is returned.

func MakeAppEnv added in v1.21.0

func MakeAppEnv(o *v1alpha1.AzureEventGridSource) []corev1.EnvVar

MakeAppEnv extracts environment variables from the object. Exported to be used in external tools for local test environments.

func NewController

func NewController(
	ctx context.Context,
	cmw configmap.Watcher,
) *controller.Impl

NewController creates a Reconciler for the event source and returns the result of NewImpl.

Types

type Reconciler

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

Reconciler implements controller.Reconciler for the event source type.

func (*Reconciler) BuildAdapter

func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)

BuildAdapter implements common.AdapterBuilder.

func (*Reconciler) FinalizeKind

FinalizeKind is called when the resource is deleted.

func (*Reconciler) ReconcileKind

ReconcileKind implements Interface.ReconcileKind.

Jump to

Keyboard shortcuts

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