state

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendPaths added in v0.2.0

type BackendPaths map[string][]*PathConfig // host->ingressPath

type Config added in v0.3.8

type Config struct {
	//DebounceDuration is the duration for Kubernetes status update debouncing.
	// Only when for this duration no update has been received the status is updated.
	// Defaults to 1 second.
	DebounceDuration time.Duration
}

Config is a data structure that holds the config options for the kubernetes state

type ConfigOption added in v0.3.8

type ConfigOption func(*Config)

ConfigOption is used to implement the functional parameter pattern for the kubernetes state

func DebounceDuration added in v0.3.8

func DebounceDuration(timeout time.Duration) ConfigOption

DebounceDuration sets the timeout for waiting for the backend response for the kubernetes state

type IngressState

type IngressState struct {
	BackendPaths BackendPaths
	TlsCerts     TlsCerts
}

type IngressStateManager

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

func New

func New(ctx context.Context, client kubernetes.Interface, ingressClassName string, options ...ConfigOption) *IngressStateManager

New creates a new Kubernetes Ingress state. The ctx can be used to cancel the listening to updates from the Kubernetes API.

func (*IngressStateManager) GetStateChan added in v0.1.1

func (stateManager *IngressStateManager) GetStateChan() <-chan *IngressState

GetStateChan returns a channel where state updates are delivered. This is the main method used to fetch the current status.

type PathConfig added in v0.3.7

type PathConfig struct {
	PathType    *v1Net.PathType
	Path        string
	Namespace   string
	ServiceName string
	ServicePort int32
}

type TlsCert added in v0.3.7

type TlsCert struct {
	Cert []byte
	Key  []byte
}

type TlsCerts added in v0.3.7

type TlsCerts map[string]*TlsCert // host->secret

Jump to

Keyboard shortcuts

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