controller

package
v0.0.0-...-7d7ad2d Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// SuccessSynced is used as part of the Event 'reason' when a Database is synced
	SuccessSynced = "Synced"

	// KanaryCreated is used to create events when a pod has been deleted
	KanaryCreated = "Kanary"

	// PodSelectingError is used to store events regarding Pod selecting issues
	PodSelectingError = "Pod Selecting Error"

	// PodListingEmpty is used to store events regarding Pod listing that return no pods
	PodListingEmpty = "Pod List Empty"

	// PodListingError is used to store events regarding Pod listing issues
	PodListingError = "Pod Listing Error"

	// PodDeletingError is used o store events regarding Pod deleting issue
	PodDeletingError = "Pod Deleting Error"

	// MessageResourceSynced is the message used for an Event fired when a Database
	// is synced successfully
	MessageResourceSynced = "Kanary synced successfully"

	ErrWeightRoutes    = "ErrWeightRoutes"
	ErrWeightRoutesMsg = "Route weight sum must equal 100"
)

Variables

This section is empty.

Functions

func String

func String(length int) string

func StringWithCharset

func StringWithCharset(length int, charset string) string

Types

type Controller

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

Controller is the controller implementation for kanary resources

func NewController

func NewController(
	kubeclientset kubernetes.Interface,
	kanaryclientset clientset.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	kanaryInformerFactory informers.SharedInformerFactory) *Controller

NewController returns a new kanary controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type HAConfigBackend

type HAConfigBackend struct {
	Name   string
	Weight float32
	IP     string
}

HAConfigBackend struct use to represent each backend line in conf

type HAProxyController

type HAProxyController struct {
	Endpoints []HAConfigBackend
}

HAProxyController to manage configFile

Jump to

Keyboard shortcuts

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