Documentation
¶
Overview ¶
Package springcloud helps interact with spring cloud remote config
Index ¶
- Variables
- type RemoteConfig
- func (c *RemoteConfig) AllKeys() []string
- func (c *RemoteConfig) Get(key string) interface{}
- func (c *RemoteConfig) GetBool(key string) bool
- func (c *RemoteConfig) GetDuration(key string) time.Duration
- func (c *RemoteConfig) GetFloat64(key string) float64
- func (c *RemoteConfig) GetInt(key string) int
- func (c *RemoteConfig) GetInt32(key string) int32
- func (c *RemoteConfig) GetInt64(key string) int64
- func (c *RemoteConfig) GetIntSlice(key string) []int
- func (c *RemoteConfig) GetSizeInBytes(key string) uint
- func (c *RemoteConfig) GetString(key string) string
- func (c *RemoteConfig) GetStringMap(key string) map[string]interface{}
- func (c *RemoteConfig) GetStringMapStringSlice(key string) map[string][]string
- func (c *RemoteConfig) GetStringSlice(key string) []string
- func (c *RemoteConfig) GetTime(key string) time.Time
- func (c *RemoteConfig) GetUint(key string) uint
- func (c *RemoteConfig) GetUint32(key string) uint32
- func (c *RemoteConfig) GetUint64(key string) uint64
- func (c *RemoteConfig) IsSet(key string) bool
- func (c *RemoteConfig) Load(ctx context.Context) error
- func (c *RemoteConfig) Set(key string, value interface{})
- func (c *RemoteConfig) ViperValue() viper.Viper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrStatusCode returned when call to springcloud remote config returns HTTP other than 2xx. ErrStatusCode = errors.New("springcloud: invalid status code response") // ErrConfigNotFound returned when profiles doesn't exists in remote config. ErrConfigNotFound = errors.New("springcloud: config not found at config server") )
Functions ¶
This section is empty.
Types ¶
type RemoteConfig ¶
type RemoteConfig struct {
// contains filtered or unexported fields
}
RemoteConfig wraps thread-safe *viper.Viper key-values from springcloud remote-config. it also implements `config.KVStore` interface.
func NewRemoteConfig ¶
func NewRemoteConfig(client *http.Client) *RemoteConfig
NewRemoteConfig create *RemoteConfig with given existing *http.Client.
func (*RemoteConfig) GetDuration ¶
func (c *RemoteConfig) GetDuration(key string) time.Duration
GetDuration ...
func (*RemoteConfig) GetFloat64 ¶
func (c *RemoteConfig) GetFloat64(key string) float64
GetFloat64 ...
func (*RemoteConfig) GetIntSlice ¶
func (c *RemoteConfig) GetIntSlice(key string) []int
GetIntSlice ...
func (*RemoteConfig) GetSizeInBytes ¶
func (c *RemoteConfig) GetSizeInBytes(key string) uint
GetSizeInBytes ...
func (*RemoteConfig) GetStringMap ¶
func (c *RemoteConfig) GetStringMap(key string) map[string]interface{}
GetStringMap ...
func (*RemoteConfig) GetStringMapStringSlice ¶
func (c *RemoteConfig) GetStringMapStringSlice(key string) map[string][]string
GetStringMapStringSlice ...
func (*RemoteConfig) GetStringSlice ¶
func (c *RemoteConfig) GetStringSlice(key string) []string
GetStringSlice ...
Click to show internal directories.
Click to hide internal directories.