testutil

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FakeTAppName   = "fake-tapp-name"
	FakeLabelKey   = "fake_tapp_label_key"
	FakeLabelValue = "fake_tapp_label_value"
)

Variables

This section is empty.

Functions

func AddPodTemplate

func AddPodTemplate(tapp *v1.TApp, templateName string, template *corev1.PodTemplateSpec) error

func CreateRawTApp

func CreateRawTApp(replica int) *v1.TApp

func CreateTAppWithTemplateCreater

func CreateTAppWithTemplateCreater(replica int, creater PodTemplateCreater) *v1.TApp

func CreateValidPodTemplate

func CreateValidPodTemplate() *corev1.PodTemplateSpec

func CreateValidTApp

func CreateValidTApp(replica int) *v1.TApp

func KillAllInstance

func KillAllInstance(tapp *v1.TApp)

func KillInstance

func KillInstance(tapp *v1.TApp, instanceId string)

func RampUp

func RampUp(tapp *v1.TApp, replica uint, templateName string) error

func RestartInstance

func RestartInstance(tapp *v1.TApp, instanceId string) bool

1. delete corresponding pod from apiserver 2. call restartInstance return true if tapp is updated

func ShrinkDown

func ShrinkDown(tapp *v1.TApp, replica uint) error

func UpdateInstanceTemplate

func UpdateInstanceTemplate(tapp *v1.TApp, instanceId string, templateId string) error

Types

type PodTemplateCreater

type PodTemplateCreater func() *corev1.PodTemplateSpec

Jump to

Keyboard shortcuts

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