config

package
v0.0.0-...-9b348fc Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMetricsFile

func BuildMetricsFile(conf []MetricsFileConfig) ([]*metrics.FileWriter, error)

BuildMetricsFile builds metrics.FileWriter with the given MetricsFileConfig. Returns error if the config is invalid or failed to create a FileWriter.

func BuildMetricsStdout

func BuildMetricsStdout(conf MetricsStdoutConfig) (*metrics.StdoutWriter, error)

BuildMetricsStdout builds a metrics.StdoutWriter with the given MetricsStdoutConfig. Returns error if failed to parse.

func BuildNode

func BuildNode(conf NodeConfig, startClock string) (*v1.Node, error)

BuildNode builds a *v1.Node with the given NodeConfig. Returns error if failed to parse.

Types

type Config

type Config struct {
	LogLevel      string
	Tick          int
	StartClock    string
	MetricsTick   int
	MetricsFile   []MetricsFileConfig
	MetricsStdout MetricsStdoutConfig
	Cluster       []NodeConfig
}

Config represents a user-specified simulator config.

type MetricsFileConfig

type MetricsFileConfig struct {
	Path      string
	Formatter string
}

type MetricsStdoutConfig

type MetricsStdoutConfig struct {
	Formatter string
}

type NodeConfig

type NodeConfig struct {
	Metadata metav1.ObjectMeta
	Spec     v1.NodeSpec
	Status   NodeStatus
}

type NodeStatus

type NodeStatus struct {
	Allocatable map[v1.ResourceName]string
}

Jump to

Keyboard shortcuts

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