config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func LoadConfigByFile

func LoadConfigByFile(file string) (*Config, error)

func LoadConfigByZK

func LoadConfigByZK(zkserver []string, path string, watch bool) (*Config, error)

func NewConfig

func NewConfig() *Config

func (*Config) Bool

func (c *Config) Bool(section, key string) (bool, error)

Bool returns bool type value.

func (*Config) ConfigLock

func (this *Config) ConfigLock()

func (*Config) ConfigRLock

func (this *Config) ConfigRLock()

func (*Config) ConfigRUnlock

func (this *Config) ConfigRUnlock()

func (*Config) ConfigUnlock

func (this *Config) ConfigUnlock()

func (*Config) Float64

func (c *Config) Float64(section, key string) (float64, error)

Float64 returns float64 type value.

func (*Config) Int

func (this *Config) Int(section, key string) (int, error)

Int returns int type value.

func (*Config) Int64

func (this *Config) Int64(section, key string) (int64, error)

Int64 returns int64 type value.

func (*Config) IsChange

func (this *Config) IsChange() bool

func (*Config) MustBool

func (this *Config) MustBool(section, key string, defaultval bool) bool

func (*Config) MustFloat64

func (this *Config) MustFloat64(section, key string, defaultval float64) float64

func (*Config) MustInt

func (this *Config) MustInt(section, key string, defaultval int) int

func (*Config) MustInt64

func (this *Config) MustInt64(section, key string, defaultval int64) int64

func (*Config) MustString

func (this *Config) MustString(section, key string, defaultval string) string

func (*Config) MustStringSlice

func (this *Config) MustStringSlice(section, key string, defaultval []string) []string

func (*Config) SetChange

func (this *Config) SetChange(b bool)

func (*Config) UpdateConfig

func (this *Config) UpdateConfig(r io.Reader) error

Jump to

Keyboard shortcuts

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