k8s

package
v3.2.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateMaxConnLimit

func CalculateMaxConnLimit(configParams *config.Config, numTyphas, numNodes int) (target int, reason string)

func PollK8sForConnectionLimit

func PollK8sForConnectionLimit(
	cxt context.Context,
	configParams *config.Config,
	tickerC <-chan time.Time,
	k8sAPI K8sAPI,
	server MaxConnsAPI,
)

Types

type K8sAPI

type K8sAPI interface {
	GetNumTyphas(namespace, serviceName, portName string) (int, error)
	GetNumNodes() (int, error)
}

type MaxConnsAPI

type MaxConnsAPI interface {
	SetMaxConns(numConns int)
}

type RealK8sAPI

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

func NewK8sAPI

func NewK8sAPI() *RealK8sAPI

func (*RealK8sAPI) GetNumNodes

func (r *RealK8sAPI) GetNumNodes() (int, error)

func (*RealK8sAPI) GetNumTyphas

func (r *RealK8sAPI) GetNumTyphas(namespace, serviceName, portName string) (int, error)

Jump to

Keyboard shortcuts

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