k8s

package
v0.0.0-...-8f3027a Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0, Apache-2.0 Imports: 10 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, numSyncerTypes int) (target int, reason string)

func PollK8sForConnectionLimit

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

Types

type K8sAPI

type K8sAPI interface {
	GetNumTyphas(ctx context.Context, 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(nc *calc.NodeCounter) *RealK8sAPI

func (*RealK8sAPI) GetNumNodes

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

func (*RealK8sAPI) GetNumTyphas

func (r *RealK8sAPI) GetNumTyphas(ctx context.Context, namespace, serviceName, portName string) (int, error)

Jump to

Keyboard shortcuts

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