Documentation
¶
Index ¶
- Variables
- type KeyObservableFunc
- type Observable
- func (ko *Observable) Get(key string) (interface{}, error)
- func (ko *Observable) Put(key string, value interface{})
- func (ko *Observable) RegisterFunc(key string, f KeyObservableFunc)
- func (ko *Observable) Set(key string, value interface{}, persist bool)
- func (ko *Observable) UnRegisterFunc(key string, f KeyObservableFunc)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrKeyNotFound ErrKeyNotFound error ErrKeyNotFound = errors.New("Key not found") )
Functions ¶
This section is empty.
Types ¶
type KeyObservableFunc ¶
type KeyObservableFunc func(value interface{})
type Observable ¶
type Observable struct {
// contains filtered or unexported fields
}
KeyObservable struct
func KeyObservable ¶
func KeyObservable() *Observable
func (*Observable) Get ¶
func (ko *Observable) Get(key string) (interface{}, error)
Get Get key in persist array . return error if key is not found
func (*Observable) Put ¶
func (ko *Observable) Put(key string, value interface{})
func (*Observable) RegisterFunc ¶
func (ko *Observable) RegisterFunc(key string, f KeyObservableFunc)
func (*Observable) Set ¶
func (ko *Observable) Set(key string, value interface{}, persist bool)
func (*Observable) UnRegisterFunc ¶
func (ko *Observable) UnRegisterFunc(key string, f KeyObservableFunc)
Click to show internal directories.
Click to hide internal directories.