Documentation
¶
Index ¶
- func SetLogger(logger log.Logger)
- type Center
- func (c *Center) EnablePublicConfig(b bool)
- func (c *Center) GetBool(key string) bool
- func (c *Center) GetDuration(key string) time.Duration
- func (c *Center) GetFileConfig(fileName string) *FileConfig
- func (c *Center) GetFloat64(key string) float64
- func (c *Center) GetHBaseThrift() string
- func (c *Center) GetHBaseThrift2() string
- func (c *Center) GetInt(key string) int
- func (c *Center) GetInt32(key string) int32
- func (c *Center) GetInt64(key string) int64
- func (c *Center) GetIntSlice(key string) []int
- func (c *Center) GetKafkaAddresses() (addrArr []string, err error)
- func (c *Center) GetPublicPostgres() *PostgreSQLConfig
- func (c *Center) GetPublicRedis() *RedisConfig
- func (c *Center) GetSizeInBytes(key string) uint
- func (c *Center) GetString(key string) string
- func (c *Center) GetStringMap(key string) map[string]interface{}
- func (c *Center) GetStringMapString(key string) map[string]string
- func (c *Center) GetStringMapStringSlice(key string) map[string][]string
- func (c *Center) GetStringSlice(key string) []string
- func (c *Center) GetTime(key string) time.Time
- func (c *Center) GetUint(key string) uint
- func (c *Center) GetUint32(key string) uint32
- func (c *Center) GetUint64(key string) uint64
- func (c *Center) Open() (err error)
- func (c *Center) SetDefault(key string, value interface{})
- func (c *Center) SetLocalConfigPath(localPath string)
- func (c *Center) SetOnlineMode(b bool)
- func (c *Center) SetPublicDefault()
- func (c *Center) Sync() (err error)
- func (c *Center) Update() (err error)
- type FileConfig
- type PostgreSQLConfig
- type RedisConfig
- type SQLConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Center ¶
type Center struct {
RemotePath string
// contains filtered or unexported fields
}
func (*Center) EnablePublicConfig ¶ added in v1.0.2
func (*Center) GetFileConfig ¶ added in v1.0.6
func (c *Center) GetFileConfig(fileName string) *FileConfig
func (*Center) GetFloat64 ¶
func (*Center) GetHBaseThrift ¶ added in v1.0.2
func (*Center) GetHBaseThrift2 ¶ added in v1.0.2
func (*Center) GetIntSlice ¶
func (*Center) GetKafkaAddresses ¶ added in v1.0.2
func (*Center) GetPublicPostgres ¶ added in v1.0.3
func (c *Center) GetPublicPostgres() *PostgreSQLConfig
func (*Center) GetPublicRedis ¶ added in v1.0.3
func (c *Center) GetPublicRedis() *RedisConfig
func (*Center) GetSizeInBytes ¶
func (*Center) GetStringMap ¶
func (*Center) GetStringMapString ¶
func (*Center) GetStringMapStringSlice ¶
func (*Center) GetStringSlice ¶
func (*Center) SetDefault ¶
func (*Center) SetLocalConfigPath ¶ added in v1.0.7
func (*Center) SetOnlineMode ¶ added in v1.0.2
func (*Center) SetPublicDefault ¶ added in v1.0.2
func (c *Center) SetPublicDefault()
type FileConfig ¶ added in v1.0.5
func (*FileConfig) Debug ¶ added in v1.0.6
func (f *FileConfig) Debug() bool
func (*FileConfig) GetZKHosts ¶ added in v1.0.5
func (f *FileConfig) GetZKHosts() []string
func (*FileConfig) Sync ¶ added in v1.0.5
func (f *FileConfig) Sync() error
type PostgreSQLConfig ¶ added in v1.0.2
type RedisConfig ¶ added in v1.0.2
type RedisConfig struct {
// A seed list of host:port addresses of cluster nodes.
Addrs []string
// The maximum number of retries before giving up. Command is retried
// on network errors and MOVED/ASK redirects.
// Default is 8 retries.
MaxRedirects int
// Enables read-only commands on slave nodes.
ReadOnly bool
// Allows routing read-only commands to the closest master or slave node.
// It automatically enables ReadOnly.
RouteByLatency bool
// Allows routing read-only commands to the random master or slave node.
// It automatically enables ReadOnly.
RouteRandomly bool
Password string
DialTimeout time.Duration
ReadTimeout time.Duration
WriteTimeout time.Duration
// PoolSize applies per cluster node and not for the whole cluster.
PoolSize int
MinIdleConns int
MaxConnAge time.Duration
PoolTimeout time.Duration
IdleTimeout time.Duration
IdleCheckFrequency time.Duration
}
Click to show internal directories.
Click to hide internal directories.