Documentation ¶
Index ¶
- Constants
- func SetConfig(config *Config, name ...string)
- type Config
- type Dist
- func (d *Dist) Clear(ctx context.Context) error
- func (d *Dist) Close(ctx context.Context) error
- func (d *Dist) Contains(ctx context.Context, key interface{}) (b bool, err error)
- func (d *Dist) Data(ctx context.Context) (data map[interface{}]interface{}, err error)
- func (d *Dist) Get(ctx context.Context, key interface{}) (value *gvar.Var, err error)
- func (d *Dist) GetExpire(ctx context.Context, key interface{}) (duration time.Duration, err error)
- func (d *Dist) GetOrSet(ctx context.Context, key interface{}, value interface{}, ...) (result *gvar.Var, err error)
- func (d *Dist) GetOrSetFunc(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (result *gvar.Var, err error)
- func (d *Dist) GetOrSetFuncLock(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (result *gvar.Var, err error)
- func (d *Dist) Keys(ctx context.Context) (keys []interface{}, err error)
- func (d *Dist) Remove(ctx context.Context, keys ...interface{}) (lastValue *gvar.Var, err error)
- func (d *Dist) Set(ctx context.Context, key interface{}, value interface{}, ...) error
- func (d *Dist) SetIfNotExist(ctx context.Context, key interface{}, value interface{}, ...) (ok bool, err error)
- func (d *Dist) SetIfNotExistFunc(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (ok bool, err error)
- func (d *Dist) SetIfNotExistFuncLock(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (ok bool, err error)
- func (d *Dist) SetMap(ctx context.Context, data map[interface{}]interface{}, duration time.Duration) error
- func (d *Dist) Size(ctx context.Context) (size int, err error)
- func (d *Dist) Update(ctx context.Context, key interface{}, value interface{}) (oldValue *gvar.Var, exist bool, err error)
- func (d *Dist) UpdateExpire(ctx context.Context, key interface{}, duration time.Duration) (oldDuration time.Duration, err error)
- func (d *Dist) Values(ctx context.Context) (values []interface{}, err error)
Constants ¶
View Source
const ( DefaultGroupName = "default" // Default configuration group name. DistCacheName = "distCache" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dist ¶
type Dist struct {
// contains filtered or unexported fields
}
func (*Dist) GetOrSetFunc ¶
func (*Dist) GetOrSetFuncLock ¶
func (*Dist) SetIfNotExist ¶
func (*Dist) SetIfNotExistFunc ¶
func (*Dist) SetIfNotExistFuncLock ¶
func (*Dist) UpdateExpire ¶
Click to show internal directories.
Click to hide internal directories.