Documentation
¶
Overview ¶
Package dync provide dynamic property supported.
Index ¶
- type Array
- type Bool
- type Duration
- type Field
- type Float32
- type Float64
- type Int32
- type Int64
- type Map
- type Properties
- func (p *Properties) Bind(i interface{}, args ...conf.BindArg) error
- func (p *Properties) BindValue(v reflect.Value, param conf.BindParam) error
- func (p *Properties) Get(key string, opts ...conf.GetOption) string
- func (p *Properties) Has(key string) bool
- func (p *Properties) Keys() []string
- func (p *Properties) Refresh(prop *conf.Properties) (err error)
- func (p *Properties) Remove(key string) error
- func (p *Properties) Resolve(s string) (string, error)
- func (p *Properties) Set(key, value string) error
- type String
- type Time
- type Uint32
- type Uint64
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array[T any] struct { // contains filtered or unexported fields }
func (*Array[T]) MarshalJSON ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
A Bool is an atomic bool value that can be dynamic refreshed.
func (*Bool) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
A Duration is an atomic time.Duration value that can be dynamic refreshed.
func (*Duration) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
A Field represents a refreshable struct field.
type Float32 ¶
type Float32 struct {
// contains filtered or unexported fields
}
A Float32 is an atomic float32 value that can be dynamic refreshed.
func (*Float32) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Float64 ¶
type Float64 struct {
// contains filtered or unexported fields
}
A Float64 is an atomic float64 value that can be dynamic refreshed.
func (*Float64) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Int32 ¶
type Int32 struct {
// contains filtered or unexported fields
}
An Int32 is an atomic int32 value that can be dynamic refreshed.
func (*Int32) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Int64 ¶
type Int64 struct {
// contains filtered or unexported fields
}
An Int64 is an atomic int64 value that can be dynamic refreshed.
func (*Int64) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Map[K, V]) MarshalJSON ¶
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
Properties refreshes registered fields dynamically and concurrently.
func (*Properties) Bind ¶
func (p *Properties) Bind(i interface{}, args ...conf.BindArg) error
Bind binds properties to a value.
func (*Properties) Get ¶
func (p *Properties) Get(key string, opts ...conf.GetOption) string
Get returns key's value.
func (*Properties) Refresh ¶
func (p *Properties) Refresh(prop *conf.Properties) (err error)
Refresh refreshes new Properties atomically.
func (*Properties) Remove ¶
func (p *Properties) Remove(key string) error
Remove delete key from properties.
func (*Properties) Resolve ¶
func (p *Properties) Resolve(s string) (string, error)
Resolve resolves string value.
func (*Properties) Set ¶
func (p *Properties) Set(key, value string) error
Set refresh properties value by key.
type String ¶
type String struct {
// contains filtered or unexported fields
}
A String is an atomic string value that can be dynamic refreshed.
func (*String) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
A Time is an atomic time.Time value that can be dynamic refreshed.
func (*Time) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Uint32 ¶
type Uint32 struct {
// contains filtered or unexported fields
}
An Uint32 is an atomic uint32 value that can be dynamic refreshed.
func (*Uint32) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.
type Uint64 ¶
type Uint64 struct {
// contains filtered or unexported fields
}
An Uint64 is an atomic uint64 value that can be dynamic refreshed.
func (*Uint64) MarshalJSON ¶
MarshalJSON returns the JSON encoding of x.