Skip to content

servers.redisserver #

fn default_handler #

fn default_handler() []RedisHandler

fn listen #

fn listen(addr string, port int) !RedisSrv

https://redis.io/topics/protocol

fn new_client #

fn new_client(mut conn net.TcpConn, mut main RedisInstance) !

fn new_client_custom #

fn new_client_custom(mut conn net.TcpConn, mut main RedisInstance, h []RedisHandler) !

fn process_input #

fn process_input(mut client redisclient.Redis, mut instance RedisInstance, value resp.RValue, h []RedisHandler) !bool

socket management

struct RedisHandler #

struct RedisHandler {
	command string
	handler RedisCallback
}

struct RedisInstance #

struct RedisInstance {
pub mut:
	db map[string]string
}

struct RedisSrv #

struct RedisSrv {
pub mut:
	socket net.TcpListener
}