workload

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppContainerName

func GetAppContainerName(appID, groupID int) string

func GetDefaultLabels

func GetDefaultLabels(appName, instanceName string, appID, groupID int) labels.Set

func GetDefaultSelector

func GetDefaultSelector(appID, groupID int) labels.Set

func ManagedSelector

func ManagedSelector() labels.Selector

Types

type Base

type Base struct {
	Interface
}

Base is the base struct for all workload resource wrappers to provide some basic methods.

func (*Base) GetAppCPU

func (b *Base) GetAppCPU() string

func (*Base) GetAppContainer

func (b *Base) GetAppContainer() *corev1.Container

func (*Base) GetAppContainerName

func (b *Base) GetAppContainerName() string

func (*Base) GetAppImage

func (b *Base) GetAppImage() string

func (*Base) GetAppMemory

func (b *Base) GetAppMemory() string

func (*Base) GetAppPort

func (b *Base) GetAppPort() int32

func (*Base) GetAppRequestCPU

func (b *Base) GetAppRequestCPU() string

func (*Base) GetAppRequestMemory

func (b *Base) GetAppRequestMemory() string

func (*Base) GetManagedSelector

func (b *Base) GetManagedSelector() labels.Selector

type Interface

type Interface interface {
	GetContainers() []corev1.Container
	GetAppID() int
	GetGroupID() int
}

Jump to

Keyboard shortcuts

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