config

package
v0.0.0-...-f1b23c0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(filepath *string) error

Load is to load yaml file

Types

type API

type API struct {
	Listen string `yaml:"listen"`
}

A API is config of Satelit API Server

type Datastore

type Datastore struct {
	Listen string `yaml:"listen"`
}

A Datastore is config of Satelit Datastore API Server

type Dorado

type Dorado struct {
	Username             string   `yaml:"username"`
	Password             string   `yaml:"password"`
	LocalIps             []string `yaml:"local_ip"`
	RemoteIps            []string `yaml:"remote_ip"`
	PortGroupName        string   `yaml:"portgroup_name"`
	StoragePoolName      string   `yaml:"storagepool_name"`
	HyperMetroDomainName string   `yaml:"hypermetrodomain_name"`
	BackendName          string   `yaml:"backend_name"`
}

A Dorado is config for Dorado

type MySQLConfig

type MySQLConfig struct {
	DSN                   string `yaml:"dsn"`
	MaxIdleConn           int    `yaml:"max_idle_conn"`
	ConnMaxLifetimeSecond int    `yaml:"conn_max_lifetime_second"`
}

A MySQLConfig is config of MySQL

type Targetd

type Targetd struct {
	APIEndpoint string `yaml:"api_endpoint"`
	Username    string `yaml:"username"`
	Password    string `yaml:"password"`
	PoolName    string `yaml:"pool_name"`
	BackendName string `yaml:"backend_name"`
	PortalIP    string `yaml:"portal_ip"`
}

A Targetd is config for targetd

type Teleskop

type Teleskop struct {
	Endpoints map[string]string `yaml:"endpoints"`
}

A Teleskop is endpoints of Teleskop example: host1: "teleskop_ip_and_port"

type YAML

type YAML struct {
	API         API         `yaml:"api"`
	Datastore   Datastore   `yaml:"datastore"`
	MySQLConfig MySQLConfig `yaml:"mysql"`
	Teleskop    Teleskop    `yaml:"teleskop"`
	Targetd     []Targetd   `yaml:"targetd"`
	LogLevel    string      `yaml:"log_level"`
}

A YAML is top element of config.yaml

func GetValue

func GetValue() YAML

GetValue return config values

Jump to

Keyboard shortcuts

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