awseventbridgesource

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 48 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// ReasonQueueCreated indicates that a SQS queue was created for receiving EventBridge events.
	ReasonQueueCreated = "QueueCreated"
	// ReasonQueueDeleted indicates that a SQS queue used for receiving EventBridge events was deleted.
	ReasonQueueDeleted = "QueueDeleted"
	// ReasonFailedQueue indicates a failure while synchronizing the SQS queue for receiving EventBridge events.
	ReasonFailedQueue = "FailedQueue"

	// ReasonSubscribed indicates that events from an EventBridge event bus have been successfully subscribed to via
	// a rule.
	ReasonSubscribed = "Subscribed"
	// ReasonUnsubscribed indicates that the subscription to an EventBridge event bus has been terminated by
	// removing a rule.
	ReasonUnsubscribed = "Unsubscribed"
	// ReasonFailedSubscribe indicates a failure while subscribing to events from an EventBridge event bus.
	ReasonFailedSubscribe = "FailedSubscribe"
	// ReasonFailedUnsubscribe indicates a failure while unsubscribing from events from an EventBridge event bus.
	ReasonFailedUnsubscribe = "FailedUnsubscribe"
)

Variables

This section is empty.

Functions

func EnsureNoQueue added in v1.22.0

func EnsureNoQueue(ctx context.Context, cli sqsiface.SQSAPI, queueName string) error

EnsureNoQueue ensures that the SQS queue used for sending EventBridge events is deleted.

func EnsureNoRule added in v1.22.0

func EnsureNoRule(ctx context.Context, cli eventbridgeiface.EventBridgeAPI,
	sqsCli sqsiface.SQSAPI) (string, error)

EnsureNoRule ensures that the EventBrige event rule is removed from the event bus.

Required permissions: - sqs:GetQueueUrl - sqs:GetQueueAttributes - events:ListRuleNamesByTarget - events:ListTagsForResource - events:DescribeRule - events:ListTargetsByRule - events:RemoveTargets - events:DeleteRule

func EnsureQueuePolicy added in v1.22.0

func EnsureQueuePolicy(ctx context.Context, cli sqsiface.SQSAPI, queue *SQSQueue, ruleARN *apis.ARN) error

EnsureQueuePolicy ensures that the correct access policy is applied to the given SQS queue.

func EnsureRule added in v1.22.0

func EnsureRule(ctx context.Context,
	cli eventbridgeiface.EventBridgeAPI, queue *SQSQueue) (*apis.ARN, error)

EnsureRule ensures that an EventBrige event rule exists for the event bus.

Required permissions: - events:ListRuleNamesByTarget - events:ListTagsForResource - events:DescribeRule - events:PutRule - events:TagResource

func MakeAppEnv added in v1.21.0

func MakeAppEnv(o *v1alpha1.AWSEventBridgeSource) []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.

func SetRuleTarget added in v1.22.0

func SetRuleTarget(ctx context.Context, cli eventbridgeiface.EventBridgeAPI, ruleARN *apis.ARN, queueARN string) error

SetRuleTarget applies a SQS target to the given rule.

Required permissions: - events:ListTargetsByRule - events:PutTargets

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.

type SQSQueue added in v1.22.0

type SQSQueue struct {
	URL    string
	ARN    string
	Policy string
}

SQSQueue wraps information about a SQS queue.

func EnsureQueue added in v1.22.0

func EnsureQueue(ctx context.Context, cli sqsiface.SQSAPI) (*SQSQueue, error)

EnsureQueue ensures the existence of a SQS queue for sending EventBridge events.

Jump to

Keyboard shortcuts

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