cluster

package
v3.7.0-0.alpha.1.546.f... Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePods

func CreatePods(c kclientset.Interface, appName string, ns string, labels map[string]string, spec kapiv1.PodSpec, maxCount int, tuning *TuningSetType)

CreatePods creates pods in user defined namspaces with user configurable tuning sets

func CreateTemplate

func CreateTemplate(oc *exutil.CLI, baseName string, ns string, configPath string, numObjects int, tuning *TuningSetType)

CreateTemplate does regex substitution against the template file, then creates the template

func InjectConfigMap

func InjectConfigMap(c kclientset.Interface, ns string, vars ParameterConfigType, config kapiv1.Pod) string

InjectConfigMap modifies the pod struct and replaces the environment variables.

func ParseConfig

func ParseConfig(config string, isFixture bool) error

ParseConfig will complete flag parsing as well as viper tasks

func ParsePods

func ParsePods(jsonFile string) (configStruct kapiv1.Pod)

ParsePods unmarshalls the json file defined in the CL config into a struct

func Server

func Server(c *PodCount) error

Server is the webservice that will syncronize the start and stop of Pods

Types

type ClusterLoaderObjectType

type ClusterLoaderObjectType struct {
	Total      int
	Number     int `mapstructure:"num"`
	Image      string
	Basename   string
	File       string
	Parameters ParameterConfigType
}

ClusterLoaderObjectType is nested object type for cluster loader struct

type ClusterLoaderType

type ClusterLoaderType struct {
	Number    int `mapstructure:"num"`
	Basename  string
	Tuning    string
	Pods      []ClusterLoaderObjectType
	Templates []ClusterLoaderObjectType
}

ClusterLoaderType struct only used for Cluster Loader test config

type ContextType

type ContextType struct {
	ClusterLoader struct {
		Cleanup    bool
		Projects   []ClusterLoaderType
		TuningSets []TuningSetType
	}
}

ContextType is the root config struct

var ConfigContext ContextType

ConfigContext variable of type ContextType

type ParameterConfigType

type ParameterConfigType struct {
	Run         string `mapstructure:"run"`
	RouterIP    string `mapstructure:"router_ip"`
	TargetHost  string `mapstructure:"target_host"`
	DurationSec int    `mapstructure:"duration"`
	Megabytes   int
}

ParameterConfigType contains config parameters for each object

type PodCount

type PodCount struct {
	Started  int
	Stopped  int
	Shutdown chan bool
}

PodCount struct keeps HTTP requst counts and state

type ServiceInfo

type ServiceInfo struct {
	Name string
	IP   string
	Port int32
}

ServiceInfo struct to bundle env data

type TestResult

type TestResult struct {
	Time time.Duration `json:"time"`
}

TestResult struct contains result data to be saved at end of run

type TuningSetObjectType

type TuningSetObjectType struct {
	Stepping struct {
		StepSize int
		Pause    time.Duration
		Timeout  time.Duration
	}
	RateLimit struct {
		Delay time.Duration
	}
}

TuningSetObjectType is shared struct for Pods & Templates

type TuningSetType

type TuningSetType struct {
	Name      string
	Pods      TuningSetObjectType
	Templates TuningSetObjectType
}

TuningSetType is nested type for controlling Cluster Loader deployment pattern

func GetTuningSet

func GetTuningSet(tuningSets []TuningSetType, podTuning string) (tuning *TuningSetType)

GetTuningSet matches the name of the tuning set defined in the project and returns a pointer to the set

Jump to

Keyboard shortcuts

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