conf

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConfig

type ClusterConfig struct {
	Zone              string   `yaml:"zone"`
	DefaultVxNetForLB string   `yaml:"defaultVxNetForLB,omitempty"`
	ClusterID         string   `yaml:"clusterID"`
	SecurityGroup     string   `yaml:"securityGroup"`
	IsApp             bool     `yaml:"isApp,omitempty"`
	TagIDs            []string `yaml:"tagIDs,omitempty"`
	InstanceIDs       []string `yaml:"instanceIDs,omitempty"`
}

func TryLoadClusterConfFromDisk

func TryLoadClusterConfFromDisk(file string) (*ClusterConfig, error)

type IpamConf

type IpamConf struct {
	Pool   PoolConf   `json:"pool,omitempty" yaml:"pool,omitempty"`
	Server ServerConf `json:"server,omitempty" yaml:"server,omitempty"`
}

func TryLoadIpamConfFromDisk

func TryLoadIpamConfFromDisk(name, path string) (*IpamConf, error)

TryLoadFromDisk loads configuration from default location after server startup return nil error if configuration file not exists

type PoolConf

type PoolConf struct {
	//global
	MaxNic         int      `json:"maxNic,omitempty" yaml:"maxNic,omitempty"`
	Sync           int      `json:"sync,omitempty" yaml:"sync,omitempty"`
	NodeSync       int      `json:"nodeSync,omitempty" yaml:"nodeSync,omitempty"`
	RouteTableBase int      `json:"routeTableBase,omitempty" yaml:"routeTableBase,omitempty"`
	Tag            string   `json:"tag,omitempty" yaml:"tag,omitempty"`
	VxNets         []string `json:"vxNets,omitempty" yaml:"vxNets,omitempty"`

	//free hostnic opts
	NodeThreshold  int `json:"nodeThreshold,omitempty" yaml:"nodeThreshold,omitempty"`
	VxnetThreshold int `json:"vxnetThreshold,omitempty" yaml:"vxnetThreshold,omitempty"`
	FreePeriod     int `json:"freePeriod,omitempty" yaml:"freePeriod,omitempty"`
}

type ServerConf

type ServerConf struct {
	ServerPath    string `json:"serverPath,omitempty" yaml:"serverPath,omitempty"`
	NetworkPolicy string `json:"networkPolicy,omitempty" yaml:"networkPolicy,omitempty"`
}

Jump to

Keyboard shortcuts

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