Module: Brpoplpush::RedisScript

Defined in:
lib/brpoplpush/redis_script.rb,
lib/brpoplpush/redis_script/dsl.rb,
lib/brpoplpush/redis_script/client.rb,
lib/brpoplpush/redis_script/config.rb,
lib/brpoplpush/redis_script/script.rb,
lib/brpoplpush/redis_script/timing.rb,
lib/brpoplpush/redis_script/logging.rb,
lib/brpoplpush/redis_script/scripts.rb,
lib/brpoplpush/redis_script/version.rb,
lib/brpoplpush/redis_script/template.rb,
lib/brpoplpush/redis_script/lua_error.rb

Overview

Interface to dealing with .lua files

Author:

Defined Under Namespace

Modules: DSL, Logging, Timing Classes: Client, Config, LuaError, Misconfiguration, Script, Scripts, Template

Constant Summary collapse

VERSION =

:nocov:

"0.1.3"

Class Method Summary collapse

Class Method Details

.execute(script_name, conn, keys: [], argv: []) ⇒ Object

Execute the given script_name

Parameters:

  • script_name (Symbol)

    the name of the lua script

  • keys (Array<String>) (defaults to: [])

    script keys

  • argv (Array<Object>) (defaults to: [])

    script arguments

  • conn (Redis)

    the redis connection to use

Returns:

  • value from script



72
73
74
# File 'lib/brpoplpush/redis_script.rb', line 72

def execute(script_name, conn, keys: [], argv: [])
  Client.execute(script_name, conn, keys: keys, argv: argv)
end

.loggerLogger

The current logger

Returns:

  • (Logger)

    the configured logger



46
47
48
# File 'lib/brpoplpush/redis_script.rb', line 46

def logger
  config.logger
end

.logger=(other) ⇒ Logger

Set a new logger

Parameters:

  • other (Logger)

    another logger

Returns:

  • (Logger)

    the new logger



57
58
59
# File 'lib/brpoplpush/redis_script.rb', line 57

def logger=(other)
  config.logger = other
end

.versionString

The current gem version

Returns:

  • (String)

    the current gem version



36
37
38
# File 'lib/brpoplpush/redis_script.rb', line 36

def version
  VERSION
end