controller

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWaitCancel = fmt.Errorf("Wait cancel")

ErrWaitCancel wait cancel

View Source
var ErrWaitTimeOut = fmt.Errorf("Wait time out")

ErrWaitTimeOut wait time out

Functions

func GetCallbackLoggerOption

func GetCallbackLoggerOption() map[string]string

GetCallbackLoggerOption get callback logger

func GetLastLoggerOption

func GetLastLoggerOption() map[string]string

GetLastLoggerOption get last logger

func GetTimeoutLoggerOption

func GetTimeoutLoggerOption() map[string]string

GetTimeoutLoggerOption get callback logger

func Replicas

func Replicas(n int) []byte

Replicas petch replicas to n

func WaitReady

func WaitReady(store store.Storer, a *v1.AppService, timeout time.Duration, logger event.Logger, cancel chan struct{}) error

WaitReady wait ready

func WaitStop

func WaitStop(store store.Storer, a *v1.AppService, timeout time.Duration, logger event.Logger, cancel chan struct{}) error

WaitStop wait service stop complate

func WaitUpgradeReady

func WaitUpgradeReady(store store.Storer, a *v1.AppService, timeout time.Duration, logger event.Logger, cancel chan struct{}) error

WaitUpgradeReady wait upgrade success

Types

type Controller

type Controller interface {
	Begin()
	Stop() error
}

Controller service operating controller interface

type Manager

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

Manager controller manager

func NewManager

func NewManager(store store.Storer, client *kubernetes.Clientset) *Manager

NewManager new manager

func (*Manager) GetControllerSize

func (m *Manager) GetControllerSize() int

GetControllerSize get running controller number

func (*Manager) StartController

func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppService) error

StartController create and start service controller

func (*Manager) Stop

func (m *Manager) Stop() error

Stop stop all controller

type TypeController

type TypeController string

TypeController controller type

var TypeApplyRuleController TypeController = "apply_rule"

TypeApplyRuleController -

var TypeRestartController TypeController = "restart"

TypeRestartController restart service type

var TypeScalingController TypeController = "scaling"

TypeScalingController start service type

var TypeStartController TypeController = "start"

TypeStartController start service type

var TypeStopController TypeController = "stop"

TypeStopController start service type

var TypeUpgradeController TypeController = "upgrade"

TypeUpgradeController start service type

Jump to

Keyboard shortcuts

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