Documentation ¶
Index ¶
- Constants
- Variables
- type ScriptHelper
- func (s ScriptHelper) Eval(script string, keys []string, args []interface{}) (v *gvar.Var, err error)
- func (s ScriptHelper) EvalSha(sha1 string, keys []string, args []interface{}) (v *gvar.Var, err error)
- func (s ScriptHelper) ScriptExists(sha1 string, sha1s ...string) (v map[string]bool, err error)
- func (s ScriptHelper) ScriptFlush(option ...gredis.ScriptFlushOption) (err error)
- func (s ScriptHelper) ScriptKill() (err error)
- func (s ScriptHelper) ScriptLoad(script string) (v string, err error)
- type ScriptRunner
- func (s *ScriptRunner) AddScript(name string, script string) (item *ScriptRunnerItem, err error)
- func (s *ScriptRunner) LoadScript(name string) (err error)
- func (s *ScriptRunner) ReLoadAllScripts() (err error)
- func (s *ScriptRunner) ReLoadWithout() (err error)
- func (s *ScriptRunner) RunAutoLoadScript(name, script string, keys []string, args []interface{}) (v *gvar.Var, err error)
- func (s *ScriptRunner) RunScript(name string, keys []string, args []interface{}) (v *gvar.Var, err error)
- func (s *ScriptRunner) SearchScript(name string) (item *ScriptRunnerItem, ok bool)
- func (s *ScriptRunner) SetScript(name string, script string) (err error)
- type ScriptRunnerItem
Constants ¶
View Source
const (
// redis 返回错误值
RedisErrNoScript = "NOSCRIPT No matching script. Please use EVAL."
)
Variables ¶
View Source
var ( // 脚本不存在 ErrScriptNotExist = errors.New("Script Not Exist") )
Functions ¶
This section is empty.
Types ¶
type ScriptHelper ¶
func NewScriptHelper ¶
func NewScriptHelper(b *base.Base) *ScriptHelper
func (ScriptHelper) ScriptExists ¶
func (ScriptHelper) ScriptFlush ¶
func (s ScriptHelper) ScriptFlush(option ...gredis.ScriptFlushOption) (err error)
func (ScriptHelper) ScriptKill ¶
func (s ScriptHelper) ScriptKill() (err error)
func (ScriptHelper) ScriptLoad ¶
func (s ScriptHelper) ScriptLoad(script string) (v string, err error)
type ScriptRunner ¶ added in v1.0.6
type ScriptRunner struct { *base.Base ScriptHelper *ScriptHelper // 脚本列表 name -> ScriptRunnerItem Scripts *gmap.Map }
func NewScriptRunner ¶ added in v1.0.6
func NewScriptRunner(b *base.Base) *ScriptRunner
func (*ScriptRunner) AddScript ¶ added in v1.0.6
func (s *ScriptRunner) AddScript(name string, script string) (item *ScriptRunnerItem, err error)
func (*ScriptRunner) LoadScript ¶ added in v1.0.6
func (s *ScriptRunner) LoadScript(name string) (err error)
func (*ScriptRunner) ReLoadAllScripts ¶ added in v1.0.6
func (s *ScriptRunner) ReLoadAllScripts() (err error)
func (*ScriptRunner) ReLoadWithout ¶ added in v1.0.6
func (s *ScriptRunner) ReLoadWithout() (err error)
func (*ScriptRunner) RunAutoLoadScript ¶ added in v1.0.9
func (*ScriptRunner) SearchScript ¶ added in v1.0.7
func (s *ScriptRunner) SearchScript(name string) (item *ScriptRunnerItem, ok bool)
type ScriptRunnerItem ¶ added in v1.0.6
func NewScriptRunnerItem ¶ added in v1.0.6
func NewScriptRunnerItem(script, sha1 string) *ScriptRunnerItem
Click to show internal directories.
Click to hide internal directories.