eventmesh

package
v0.0.0-...-11b31ba Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSubscriptionNameLength = 50
)

Variables

View Source
var ErrEMSubjectInvalid = errors.New("EventMesh subject invalid")

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Initialize should initialize the communication layer with the messaging backend system
	Initialize(cfg env.Config) error

	// SyncSubscription should synchronize the Kyma eventing subscription with the subscriber infrastructure of messaging backend system.
	// It should return true if Kyma eventing subscription status was changed during this synchronization process.
	SyncSubscription(subscription *eventingv1alpha2.Subscription, cleaner cleaner.Cleaner, apiRule *apigatewayv1beta1.APIRule) (bool, error)

	// DeleteSubscription should delete the corresponding subscriber data of messaging backend
	DeleteSubscription(subscription *eventingv1alpha2.Subscription) error
}

type EventMesh

type EventMesh struct {
	SubNameMapper backendutils.NameMapper
	// contains filtered or unexported fields
}

func NewEventMesh

func NewEventMesh(credentials *OAuth2ClientCredentials, mapper backendutils.NameMapper,
	logger *logger.Logger,
) *EventMesh

func (*EventMesh) DeleteSubscription

func (em *EventMesh) DeleteSubscription(subscription *eventingv1alpha2.Subscription) error

DeleteSubscription deletes the corresponding EventMesh subscription.

func (*EventMesh) Initialize

func (em *EventMesh) Initialize(cfg env.Config) error

func (*EventMesh) SetCredentials

func (em *EventMesh) SetCredentials(credentials *OAuth2ClientCredentials)

SetCredentials sets the WebhookAuth credentials. WARNING: This functions should be used for testing purposes only.

func (*EventMesh) SyncSubscription

func (em *EventMesh) SyncSubscription(subscription *eventingv1alpha2.Subscription, cleaner cleaner.Cleaner, apiRule *apigatewayv1beta1.APIRule) (bool, error)

SyncSubscription synchronize the EV2 subscription with the EMS subscription. It returns true, if the EV2 subscription status was changed.

type HTTPStatusError

type HTTPStatusError struct {
	StatusCode int
}

func (HTTPStatusError) Error

func (e HTTPStatusError) Error() string

func (*HTTPStatusError) Is

func (e *HTTPStatusError) Is(target error) bool

type OAuth2ClientCredentials

type OAuth2ClientCredentials struct {
	ClientID     string
	ClientSecret string
	TokenURL     string
	CertsURL     string
}

type Response

type Response struct {
	StatusCode int
	Error      error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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