config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfKeyName = iota
	ConfDefaultValue
)

Variables

This section is empty.

Functions

func GetBackendsMap

func GetBackendsMap() map[string]BackendProperties

func GetConfigPath added in v0.5.1

func GetConfigPath() string

Types

type BackendProperties

type BackendProperties struct {
	Name               string `conf:"name"`
	Description        string `conf:"description"`
	DriverName         string `conf:"driver_name"`
	ConfigPath         string `conf:"config_path"`
	SupportReplication bool   `conf:"support_replication,false"`
}

type Backends

type Backends struct {
	Ceph                 BackendProperties `conf:"ceph"`
	Cinder               BackendProperties `conf:"cinder"`
	Sample               BackendProperties `conf:"sample"`
	LVM                  BackendProperties `conf:"lvm"`
	IBMSpectrumScale     BackendProperties `conf:"spectrumscale"`
	HuaweiOceanStorBlock BackendProperties `conf:"huawei_oceanstor_block"`
	HuaweiFusionStorage  BackendProperties `conf:"huawei_fusionstorage"`
	HuaweiOceanStorFile  BackendProperties `conf:"huawei_oceanstor_file"`
	HpeNimble            BackendProperties `conf:"hpe_nimble"`
	NFS                  BackendProperties `conf:"nfs"`
	Manila               BackendProperties `conf:"manila"`
	FujitsuEternus       BackendProperties `conf:"fujitsu_eternus"`
	Chubaofs             BackendProperties `conf:"chubaofs"`
	NetappOntapSan       BackendProperties `conf:"netapp_ontap_san"`
	NetappOntapNas       BackendProperties `conf:"netapp_ontap_nas"`
}

type Config

type Config struct {
	Default           `conf:"default"`
	OsdsDock          `conf:"osdsdock"`
	Database          `conf:"database"`
	KeystoneAuthToken `conf:"keystone_authtoken"`
}
var CONF *Config = GetDefaultConfig()

Global Configuration Variable

func GetDefaultConfig

func GetDefaultConfig() *Config

Create a Config and init default value.

func (*Config) Load

func (c *Config) Load()

type Database

type Database struct {
	Credential      string `conf:"credential,username:password@tcp(ip:port)/dbname"`
	Driver          string `conf:"driver,etcd"`
	Endpoint        string `conf:"endpoint,localhost:2379,localhost:2380"`
	Username        string `conf:"username"`
	Password        string `conf:"password"`
	EnableTLS       bool   `conf:"enableTLS,false"`
	CertFile        string `conf:"cert_file,/etc/etcd/server.crt"`
	KeyFile         string `conf:"key_file,/etc/etcd/server.key"`
	TrustedCAFile   string `conf:"ca_file,/etc/etcd/ca.crt"`
	AllowClientAuth bool   `conf:"allowClientAuth,false"`
}

type Default

type Default struct{}

type KeystoneAuthToken added in v0.1.4

type KeystoneAuthToken struct {
	MemcachedServers  string `conf:"memcached_servers"`
	SigningDir        string `conf:"signing_dir"`
	Cafile            string `conf:"cafile"`
	AuthUri           string `conf:"auth_uri"`
	ProjectDomainName string `conf:"project_domain_name"`
	ProjectName       string `conf:"project_name"`
	UserDomainName    string `conf:"user_domain_name"`
	Password          string `conf:"password"`
	// Encryption and decryption tool. Default value is aes. The decryption tool can only decrypt the corresponding ciphertext.
	PwdEncrypter string `conf:"pwd_encrypter,aes"`
	// Whether to encrypt the password. If enabled, the value of the password must be ciphertext.
	EnableEncrypted bool   `conf:"enable_encrypted,false"`
	Username        string `conf:"username"`
	AuthUrl         string `conf:"auth_url"`
	AuthType        string `conf:"auth_type"`
}

type OsdsDock

type OsdsDock struct {
	ApiEndpoint                string        `conf:"api_endpoint,localhost:50050"`
	DockType                   string        `conf:"dock_type,provisioner"`
	EnabledBackends            []string      `conf:"enabled_backends,lvm"`
	Daemon                     bool          `conf:"daemon,false"`
	BindIp                     string        `conf:"bind_ip"` // Just used for attacher dock
	HostBasedReplicationDriver string        `conf:"host_based_replication_driver,drbd"`
	LogFlushFrequency          time.Duration `conf:"log_flush_frequency,5s"` // Default value is 5s
	Backends
}

Jump to

Keyboard shortcuts

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