Version: v0.12.0 Latest Latest

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0




View Source
const (
	ConfKeyName = iota


This section is empty.


func GetBackendsMap

func GetBackendsMap() map[string]BackendProperties


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"`
	HuaweiDorado BackendProperties `conf:"huawei_dorado"`

type Config

type Config struct {
	Default           `conf:"default"`
	OsdsLet           `conf:"osdslet"`
	OsdsDock          `conf:"osdsdock"`
	Database          `conf:"database"`
	KeystoneAuthToken `conf:"keystone_authtoken"`
	Flag              FlagSet
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(confFile string)

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"`

type Default

type Default struct{}

type Flag

type Flag struct {
	InValue interface{}
	Value   interface{}

type FlagSet

type FlagSet struct {
	// contains filtered or unexported fields

func (*FlagSet) Add

func (f *FlagSet) Add(name string, flag *Flag)

func (*FlagSet) AssignValue

func (f *FlagSet) AssignValue()

func (*FlagSet) BoolVar

func (f *FlagSet) BoolVar(p *bool, name string, defValue bool, usage string)

func (*FlagSet) Float64Var

func (f *FlagSet) Float64Var(p *float64, name string, defValue float64, usage string)

func (*FlagSet) Int64Var

func (f *FlagSet) Int64Var(p *int64, name string, defValue int64, usage string)

func (*FlagSet) IntVar

func (f *FlagSet) IntVar(p *int, name string, defValue int, usage string)

func (*FlagSet) Parse

func (f *FlagSet) Parse()

func (*FlagSet) StringVar

func (f *FlagSet) StringVar(p *string, name string, defValue string, usage string)

func (*FlagSet) Uint64Var

func (f *FlagSet) Uint64Var(p *uint64, name string, defValue uint64, usage string)

func (*FlagSet) UintVar

func (f *FlagSet) UintVar(p *uint, name string, defValue uint, usage string)

type KeystoneAuthToken

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"`
	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"`

type OsdsLet

type OsdsLet struct {
	ApiEndpoint  string `conf:"api_endpoint,localhost:50040"`
	Graceful     bool   `conf:"graceful,true"`
	SocketOrder  string `conf:"socket_order"`
	AuthStrategy string `conf:"auth_strategy,noauth"`
	Daemon       bool   `conf:"daemon,false"`
	PolicyPath   string `conf:"policy_path,/etc/opensds/policy.json"`

type Value

type Value interface {
	Set(string) error

Jump to

Keyboard shortcuts

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