configs

package
v0.0.0-...-2d06211 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure()

func DumpToFile

func DumpToFile(c *AppConfig, path string) error

func InitLogger

func InitLogger()

func SetDefaultBool

func SetDefaultBool(p **bool, val bool)

func SetDefaultInt

func SetDefaultInt(p **int, val int)

func SetDefaultString

func SetDefaultString(p **string, val string)

Types

type AppConfig

type AppConfig struct {
	Topologies *[]*Topology `yaml:"topologies"`
	Endpoints  *[]*Endpoint `yaml:"endpoints"`
	Nodes      *[]*Node     `yaml:"nodes"`
}

func GetAppConfig

func GetAppConfig() *AppConfig

func LoadFromBytes

func LoadFromBytes(bytes []byte) (*AppConfig, error)

func LoadFromFile

func LoadFromFile(path string) (*AppConfig, error)

func (*AppConfig) SetDefaults

func (v *AppConfig) SetDefaults()

func (*AppConfig) String

func (c *AppConfig) String() string

type CmdConfig

type CmdConfig struct {
	Home   string `yaml:"home"`
	Debug  bool   `yaml:"debug"`
	Quiet  bool   `yaml:"quiet"`
	Config string `yaml:"config"`
}

func GetCmdConfig

func GetCmdConfig() *CmdConfig

func (*CmdConfig) String

func (c *CmdConfig) String() string

type Dut

type Dut struct {
	Image *string `yaml:"image"`
}

func (*Dut) SetDefaults

func (v *Dut) SetDefaults()

type Endpoint

type Endpoint struct {
	Name  *string       `yaml:"name"`
	Kind  *EndpointKind `yaml:"kind"`
	IxiaC *IxiaC        `yaml:"ixia_c"`
	Dut   *Dut          `yaml:"dut"`
}

func (*Endpoint) SetDefaults

func (v *Endpoint) SetDefaults()

type EndpointKind

type EndpointKind string
const (
	EndpointKindIxiaC EndpointKind = "ixia_c"
	EndpointKindDut   EndpointKind = "dut"
)

func (*EndpointKind) IsValid

func (t *EndpointKind) IsValid() bool

type IxiaC

type IxiaC struct {
	Release       *string `yaml:"release"`
	Free          *bool   `yaml:"free"`
	Controller    *string `yaml:"controller"`
	TrafficEngine *string `yaml:"traffic_engine"`
}

func (*IxiaC) SetDefaults

func (v *IxiaC) SetDefaults()

type Node

type Node struct {
	Host   *string `yaml:"host"`
	Port   *int    `yaml:"port"`
	User   *string `yaml:"user"`
	Master *bool   `yaml:"master"`
}

func (*Node) DockerHost

func (n *Node) DockerHost() string

func (*Node) SetDefaults

func (v *Node) SetDefaults()

type Topology

type Topology struct {
	Name        *string           `yaml:"name"`
	CreateLinks *bool             `yaml:"create_links"`
	Platform    *TopologyPlatform `yaml:"platform"`
	Links       *[]string         `yaml:"links"`
}

func (*Topology) SetDefaults

func (v *Topology) SetDefaults()

type TopologyPlatform

type TopologyPlatform string
const (
	TopologyPlatformDocker TopologyPlatform = "docker"
	TopologyPlatformKind   TopologyPlatform = "kind"
)

func (*TopologyPlatform) IsValid

func (t *TopologyPlatform) IsValid() bool

Jump to

Keyboard shortcuts

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