Documentation ¶
Index ¶
- Constants
- func ConvertToJSON(val lua.LValue) string
- func ConvertToLua(L *lua.LState, val resp.Value) lua.LValue
- func ConvertToRESP(val lua.LValue) resp.Value
- func FenceMatch(hookName string, sw *scanWriter, fence *liveFenceSwitches, metas []FenceMeta, ...) [][]byte
- func ListenAndServe(host string, port int, dir string, http bool) error
- func ListenAndServeEx(host string, port int, dir string, ln *net.Listener, http bool) error
- func Sha1Sum(s string) string
- type Config
- type Conn
- type Controller
- type FenceMeta
- type Hook
- type LegacyAOFReader
- type ScanWriterParams
Constants ¶
View Source
const ( FollowHost = "follow_host" FollowPort = "follow_port" FollowID = "follow_id" FollowPos = "follow_pos" ServerID = "server_id" ReadOnly = "read_only" RequirePass = "requirepass" LeaderAuth = "leaderauth" ProtectedMode = "protected-mode" MaxMemory = "maxmemory" AutoGC = "autogc" KeepAlive = "keepalive" )
Variables ¶
This section is empty.
Functions ¶
func ConvertToJSON ¶
func ConvertToJSON(val lua.LValue) string
ConvertToJSON converts lua LValue to JSON string
func ConvertToLua ¶
ConvertToLua converts RESP value to lua LValue
func ConvertToRESP ¶
ConvertToRESP convert lua LValue to RESP value
func FenceMatch ¶
func FenceMatch(hookName string, sw *scanWriter, fence *liveFenceSwitches, metas []FenceMeta, details *commandDetailsT) [][]byte
FenceMatch executes a fence match returns back json messages for fence detection.
func ListenAndServe ¶
ListenAndServe starts a new tile38 server
func ListenAndServeEx ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a tile38 config
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a simple resp connection.
func DialTimeout ¶
DialTimeout dials a resp server.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is a tile38 controller
func (*Controller) NewPool ¶
func (c *Controller) NewPool() *lStatePool
NewPool returns a new pool of lua states
func (*Controller) NewScriptMap ¶
func (c *Controller) NewScriptMap() *lScriptMap
NewScriptMap returns a new map with lua scripts
type Hook ¶
type Hook struct { Key string Name string Endpoints []string Message *server.Message Fence *liveFenceSwitches ScanWriter *scanWriter Metas []FenceMeta // contains filtered or unexported fields }
Hook represents a hook.
type LegacyAOFReader ¶
type LegacyAOFReader struct {
// contains filtered or unexported fields
}
LegacyAOFReader represents the older AOF file reader.
func NewLegacyAOFReader ¶
func NewLegacyAOFReader(r io.Reader) *LegacyAOFReader
NewLegacyAOFReader creates a new LegacyAOFReader.
func (*LegacyAOFReader) ReadCommand ¶
func (rd *LegacyAOFReader) ReadCommand() ([]byte, error)
ReadCommand reads an old command.
type ScanWriterParams ¶
type ScanWriterParams struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.