store

package
v5.1.6-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: LGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type EventType
	Obj  interface{}
}

Event holds the context of an event.

type EventType

type EventType string

EventType -

const (
	// CreateEvent event associated with new objects in an informer
	CreateEvent EventType = "CREATE"
	// UpdateEvent event associated with an object update in an informer
	UpdateEvent EventType = "UPDATE"
	// DeleteEvent event associated when an object is removed from an informer
	DeleteEvent EventType = "DELETE"
	// CertificatePath is the default path of certificate file
	CertificatePath = "/run/nginx/conf/certificate"
	// DefVirSrvName is the default virtual service name
	DefVirSrvName = "_"
)

type Informer

type Informer struct {
	Ingress  cache.SharedIndexInformer
	Service  cache.SharedIndexInformer
	Endpoint cache.SharedIndexInformer
	Secret   cache.SharedIndexInformer
}

Informer defines the required SharedIndexInformers that interact with the API server.

func (*Informer) Run

func (i *Informer) Run(stopCh chan struct{})

Run initiates the synchronization of the informers against the API server.

type IngressAnnotationsLister

type IngressAnnotationsLister struct {
	cache.Store
}

IngressAnnotationsLister makes a Store that lists annotations in Ingress rules.

func (IngressAnnotationsLister) ByKey

ByKey returns the Ingress annotations matching key in the local Ingress annotations Store.

type Lister

type Lister struct {
	Ingress           istroe.IngressLister
	Service           istroe.ServiceLister
	Endpoint          istroe.EndpointLister
	Secret            istroe.SecretLister
	IngressAnnotation IngressAnnotationsLister
}

Lister contains object listers (stores).

type SSLCertTracker

type SSLCertTracker struct {
	cache.ThreadSafeStore
}

SSLCertTracker holds a store of referenced Secrets in Ingress rules

func NewSSLCertTracker

func NewSSLCertTracker() *SSLCertTracker

NewSSLCertTracker creates a new SSLCertTracker store

func (SSLCertTracker) ByKey

func (s SSLCertTracker) ByKey(key string) (*v1.SSLCert, error)

ByKey searches for an ingress in the local ingress Store

type Storer

type Storer interface {
	// list endpoints pool
	ListPool() ([]*v1.Pool, []*v1.Pool)

	// list virtual service
	ListVirtualService() ([]*v1.VirtualService, []*v1.VirtualService)

	ListIngresses() []*extensions.Ingress

	GetIngressAnnotations(key string) (*annotations.Ingress, error)

	// Run initiates the synchronization of the controllers
	Run(stopCh chan struct{})

	// GetDefaultBackend returns the default backend configuration
	GetDefaultBackend() defaults.Backend
}

Storer is the interface that wraps the required methods to gather information

func New

func New(client kubernetes.Interface,
	updateCh *channels.RingChannel,
	conf *option.Config) Storer

New creates a new Storer

Jump to

Keyboard shortcuts

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