Documentation ¶
Index ¶
- Constants
- type Config
- type DumbCache
- func (d *DumbCache) CalcInt(input interface{}, out *int64, handler func() (int64, error)) error
- func (d *DumbCache) Connect(config *Config) error
- func (d *DumbCache) Count(input interface{}, out *int64, handler func() (int64, error)) error
- func (d *DumbCache) Expire(input interface{}) error
- func (d *DumbCache) List(input, out interface{}, handler func() (interface{}, error)) error
- func (d *DumbCache) ListWithProto(input interface{}, out proto.Message, handler func() (proto.Message, error)) error
- func (d *DumbCache) MakeHash(in interface{}) (string, error)
- func (d *DumbCache) ParseData(input, out interface{}) error
- func (d *DumbCache) ParseDataWithProto(input interface{}, out proto.Message) error
- func (d *DumbCache) Set(prefix string, input, payload interface{}) error
- func (d *DumbCache) SetWithProto(prefix string, input interface{}, payload proto.Message) error
- type IDumbCache
- type ILocalModule
- type LocalModule
- type Message
Constants ¶
View Source
const ( CLIST = "c_list_" CCOUNT = "c_count_" CCACLINT = "c_calc_int_" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DumbCache ¶
type DumbCache struct {
// contains filtered or unexported fields
}
func (*DumbCache) ListWithProto ¶ added in v1.1.6
func (d *DumbCache) ListWithProto(input interface{}, out proto.Message, handler func() (proto.Message, error)) error
ListWithProto list cache data out is a pointer
func (*DumbCache) ParseDataWithProto ¶ added in v1.1.6
ParseData out is a pointer
type IDumbCache ¶
type IDumbCache interface { // connect redis Connect(config *Config) error // Set raw to get raw Set(prefix string, input, payload interface{}) error SetWithProto(prefix string, input interface{}, payload proto.Message) error // Make hash key MakeHash(in interface{}) (string, error) ParseData(input, out interface{}) error ParseDataWithProto(input interface{}, payload proto.Message) error Expire(input interface{}) error List(input, out interface{}, handler func() (interface{}, error)) error ListWithProto(input interface{}, out proto.Message, handler func() (proto.Message, error)) error Count(input interface{}, out *int64, handler func() (int64, error)) error CalcInt(input interface{}, out *int64, handler func() (int64, error)) error }
type ILocalModule ¶ added in v1.1.1
type LocalModule ¶ added in v1.1.1
type LocalModule struct {
// contains filtered or unexported fields
}
func CreateLocalModule ¶ added in v1.1.1
func CreateLocalModule(size int, duration time.Duration) *LocalModule
func (*LocalModule) Del ¶ added in v1.1.1
func (l *LocalModule) Del(key interface{})
func (*LocalModule) Get ¶ added in v1.1.1
func (l *LocalModule) Get(key interface{}) (string, error)
func (*LocalModule) Set ¶ added in v1.1.1
func (l *LocalModule) Set(key interface{}, value interface{}) error
Click to show internal directories.
Click to hide internal directories.