Documentation
¶
Index ¶
- Constants
- type IObjStore
- type IThreadSafeMap
- type ObjStore
- func (obj *ObjStore) Add(section interface{}, key string, value interface{}) error
- func (obj *ObjStore) Delete(section interface{}, key string) error
- func (obj *ObjStore) Exist(section interface{}, key string) bool
- func (obj *ObjStore) Get(section interface{}, key string) (interface{}, error)
- func (obj *ObjStore) Len() int
- func (obj *ObjStore) List() []IThreadSafeMap
- func (obj *ObjStore) Update(section interface{}, key string, value interface{}) error
- type ThreadSafeMap
- func (t *ThreadSafeMap) Add(key string, item interface{}) error
- func (t *ThreadSafeMap) CleanAll() error
- func (t *ThreadSafeMap) Delete(key string) error
- func (t *ThreadSafeMap) Exist(key string) bool
- func (t *ThreadSafeMap) Get(key string) (interface{}, error)
- func (t *ThreadSafeMap) Len() int
- func (t *ThreadSafeMap) List() []interface{}
- func (t *ThreadSafeMap) Update(key string, item interface{}) error
Constants ¶
View Source
const (
OBJECT_STORE_MAX_CAP = 1000
)
View Source
const (
THREAD_SAFE_MAP_MAX_CAP = 1000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IObjStore ¶
type IObjStore interface {
Add(interface{}, string, interface{}) error
Get(interface{}, string) (interface{}, error)
Exist(interface{}, string) bool
Len() int
Delete(interface{}, string) error
Update(interface{}, string, interface{}) error
List() []IThreadSafeMap
}
func NewObjStore ¶
type IThreadSafeMap ¶
type IThreadSafeMap interface {
Add(string, interface{}) error
Get(string) (interface{}, error)
CleanAll() error
Exist(string) bool
Len() int
Delete(string) error
Update(string, interface{}) error
List() []interface{}
}
thread safe map
func NewThreadSafeMap ¶
func NewThreadSafeMap(cap int) IThreadSafeMap
type ObjStore ¶
type ObjStore struct {
// contains filtered or unexported fields
}
func (*ObjStore) List ¶
func (obj *ObjStore) List() []IThreadSafeMap
type ThreadSafeMap ¶
type ThreadSafeMap struct {
// contains filtered or unexported fields
}
func (*ThreadSafeMap) Add ¶
func (t *ThreadSafeMap) Add(key string, item interface{}) error
func (*ThreadSafeMap) Delete ¶
func (t *ThreadSafeMap) Delete(key string) error
func (*ThreadSafeMap) Exist ¶
func (t *ThreadSafeMap) Exist(key string) bool
func (*ThreadSafeMap) Get ¶
func (t *ThreadSafeMap) Get(key string) (interface{}, error)
func (*ThreadSafeMap) Len ¶
func (t *ThreadSafeMap) Len() int
func (*ThreadSafeMap) List ¶
func (t *ThreadSafeMap) List() []interface{}
func (*ThreadSafeMap) Update ¶
func (t *ThreadSafeMap) Update(key string, item interface{}) error
Click to show internal directories.
Click to hide internal directories.