Documentation ¶
Index ¶
- func Watch(o *onion.Onion)
- func WatchContext(ctx context.Context, o *onion.Onion)
- type Bool
- type Float
- type Int
- type RefWatch
- func (rw *RefWatch) RegisterBool(key string, def bool) Bool
- func (rw *RefWatch) RegisterDuration(key string, def time.Duration) Int
- func (rw *RefWatch) RegisterFloat32(key string, def float32) Float
- func (rw *RefWatch) RegisterFloat64(key string, def float64) Float
- func (rw *RefWatch) RegisterInt(key string, def int) Int
- func (rw *RefWatch) RegisterInt64(key string, def int64) Int
- func (rw *RefWatch) RegisterString(key string, def string) String
- func (rw *RefWatch) Watch(ctx context.Context, o *onion.Onion)
- type String
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bool ¶
type Bool interface { // The bool value Bool() bool }
Bool is the bool value holder, with safe lock for concurrent reload
func RegisterBool ¶
RegisterBool return an bool variable and set the value when the config is loaded
type Float ¶
Float is the float value holder, with safe lock for concurrent reload
func RegisterFloat32 ¶
RegisterFloat32 return an float32 variable and set the value when the config is loaded
func RegisterFloat64 ¶
RegisterFloat64 return an float64 variable and set the value when the config is loaded
type Int ¶
type Int interface { // Return the int value Int() int // Return int64 value Int64() int64 // Return duration value Duration() time.Duration }
Int is the int value holder, with safe lock for concurrent reload
func RegisterDuration ¶
RegisterDuration return an duration variable and set the value when the config is loaded
func RegisterInt ¶
RegisterInt return an int variable and set the value when the config is loaded
func RegisterInt64 ¶
RegisterInt64 return an int64 variable and set the value when the config is loaded
type RefWatch ¶
type RefWatch struct {
// contains filtered or unexported fields
}
RefWatch is a class to watch over the onion instance and change the registered variables
func (*RefWatch) RegisterBool ¶
RegisterBool return an bool variable and set the value when the config is loaded
func (*RefWatch) RegisterDuration ¶
RegisterDuration return an duration variable and set the value when the config is loaded
func (*RefWatch) RegisterFloat32 ¶
RegisterFloat32 return an float32 variable and set the value when the config is loaded
func (*RefWatch) RegisterFloat64 ¶
RegisterFloat64 return an float64 variable and set the value when the config is loaded
func (*RefWatch) RegisterInt ¶
RegisterInt return an int variable and set the value when the config is loaded
func (*RefWatch) RegisterInt64 ¶
RegisterInt64 return an int64 variable and set the value when the config is loaded
func (*RefWatch) RegisterString ¶
RegisterString return an string variable and set the value when the config is loaded