events

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteEvent

type DeleteEvent struct {
	// NamespacedName is the namespace & name of the deleted resource.
	NamespacedName types.NamespacedName
	// Type is the resource type. For example, if the event is for *v1alpha2.HTTPRoute, pass &v1alpha2.HTTPRoute{} as Type.
	Type client.Object
}

DeleteEvent representing deleting a resource.

type EventLoop

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

EventLoop is the main event loop of the Gateway.

func NewEventLoop

func NewEventLoop(cfg EventLoopConfig) *EventLoop

NewEventLoop creates a new EventLoop.

func (*EventLoop) Start

func (el *EventLoop) Start(ctx context.Context) error

Start starts the EventLoop. The method will block until the EventLoop stops: - if it stops because of an error, the Start will return the error. - if it stops normally, the Start will return nil.

type EventLoopConfig

type EventLoopConfig struct {
	// Processor is the state ChangeProcessor.
	Processor state.ChangeProcessor
	// ServiceStore is the state ServiceStore.
	ServiceStore state.ServiceStore
	// SecretStore is the state SecretStore.
	SecretStore state.SecretStore
	// SecretMemoryManager is the state SecretMemoryManager.
	SecretMemoryManager state.SecretDiskMemoryManager
	// Generator is the nginx config Generator.
	Generator config.Generator
	// EventCh is a read-only channel for events.
	EventCh <-chan interface{}
	// Logger is the logger to be used by the EventLoop.
	Logger logr.Logger
	// NginxFileMgr is the file Manager for nginx.
	NginxFileMgr file.Manager
	// NginxRuntimeMgr manages nginx runtime.
	NginxRuntimeMgr runtime.Manager
	// StatusUpdater updates statuses on Kubernetes resources.
	StatusUpdater status.Updater
}

EventLoopConfig holds configuration parameters for EventLoop.

type UpsertEvent

type UpsertEvent struct {
	// Resource is the resource that is being upserted.
	Resource client.Object
}

UpsertEvent represents upserting a resource.

Jump to

Keyboard shortcuts

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