config

package
v0.0.0-...-55e4108 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMetricsLogger

func BuildMetricsLogger(conf []MetricsLoggerConfig) ([]*metrics.FileWriter, error)

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

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
	MetricsLogger []MetricsLoggerConfig
	Cluster       []NodeConfig
}

Config represents a user-specified simulator config.

type MetricsLoggerConfig

type MetricsLoggerConfig struct {
	// Dest is an output device or file path in which the metrics is written.
	Dest string
	// Formatter is a type of metrics format.
	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