ingress

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidType = fmt.Errorf("invalid type")
)

Functions

func NewClient

func NewClient(cs kubernetes.Interface, ns string) client.Client

func NewMonitor

func NewMonitor(publisher Publisher, handler Handler) (kcache.Monitor, error)

func ServicesFilter

func ServicesFilter(ingresses ...*appsv1.Ingress) filter.ComparableFilter

Types

type BaseHandler

type BaseHandler interface {
	OnCreate(*networkingv1beta1.Ingress)
	OnUpdate(*networkingv1beta1.Ingress)
	OnDelete(*networkingv1beta1.Ingress)
}

type CacheController

type CacheController interface {
	Cache() CacheReader
	Ready() <-chan struct{}
}

type CacheReader

type CacheReader interface {
	Get(ns string, name string) (*networkingv1beta1.Ingress, error)
	List() ([]*networkingv1beta1.Ingress, error)
}

type Controller

type Controller interface {
	CacheController
	Publisher
	Done() <-chan struct{}
	Close()
	Error() error
}

func BuildController

func BuildController(ctx context.Context, log logutil.Log, client client.Client) (Controller, error)

func NewController

func NewController(ctx context.Context, log logutil.Log, cs kubernetes.Interface, ns string) (Controller, error)

type Event

type Event interface {
	Type() kcache.EventType
	Resource() *networkingv1beta1.Ingress
}

type FilterController

type FilterController interface {
	Controller
	Refilter(filter.Filter) error
}

type FilterSubscription

type FilterSubscription interface {
	Subscription
	Refilter(filter.Filter) error
}

type Handler

type Handler interface {
	BaseHandler
	OnInitialize([]*networkingv1beta1.Ingress)
}

func ToUnitary

func ToUnitary(log logutil.Log, delegate UnitaryHandler) Handler

type HandlerBuilder

type HandlerBuilder interface {
	OnInitialize(func([]*networkingv1beta1.Ingress)) HandlerBuilder
	OnCreate(func(*networkingv1beta1.Ingress)) HandlerBuilder
	OnUpdate(func(*networkingv1beta1.Ingress)) HandlerBuilder
	OnDelete(func(*networkingv1beta1.Ingress)) HandlerBuilder
	Create() Handler
}

func BuildHandler

func BuildHandler() HandlerBuilder

type Publisher

type Publisher interface {
	Subscribe() (Subscription, error)
	SubscribeWithFilter(filter.Filter) (FilterSubscription, error)
	SubscribeForFilter() (FilterSubscription, error)
	Clone() (Controller, error)
	CloneWithFilter(filter.Filter) (FilterController, error)
	CloneForFilter() (FilterController, error)
}

type Subscription

type Subscription interface {
	CacheController
	Events() <-chan Event
	Close()
	Done() <-chan struct{}
}

type UnitaryHandler

type UnitaryHandler interface {
	BaseHandler
	OnInitialize(*networkingv1beta1.Ingress)
}

type UnitaryHandlerBuilder

type UnitaryHandlerBuilder interface {
	OnInitialize(func(*networkingv1beta1.Ingress)) UnitaryHandlerBuilder
	OnCreate(func(*networkingv1beta1.Ingress)) UnitaryHandlerBuilder
	OnUpdate(func(*networkingv1beta1.Ingress)) UnitaryHandlerBuilder
	OnDelete(func(*networkingv1beta1.Ingress)) UnitaryHandlerBuilder
	Create() UnitaryHandler
}

func BuildUnitaryHandler

func BuildUnitaryHandler() UnitaryHandlerBuilder

Jump to

Keyboard shortcuts

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