Module esnowflake_redis

publish random uniq worker id.

Behaviours: gen_server.

Description

publish random uniq worker id

Function Index

code_change/3
get_wid/0
handle_call/3
handle_cast/2
handle_info/2
init/1
setnx_wid/1 set with xx(only set key not exist) and expire.
setxx_wid/1 set with xx(only set key already exist) and expire.
start_link/1
terminate/2

Function Details

code_change/3

code_change(OldVsn, State, Extra) -> any()

get_wid/0

get_wid() -> any()

handle_call/3

handle_call(Info, From, State) -> any()

handle_cast/2

handle_cast(Info, State) -> any()

handle_info/2

handle_info(Info, State) -> any()

init/1

init(X1) -> any()

setnx_wid/1

setnx_wid(Wid::integer()) -> {ok, binary()} | {ok, undefined} | {error, term()}

set with xx(only set key not exist) and expire.

setxx_wid/1

setxx_wid(Key::integer()) -> {ok, binary()} | {ok, undefined} | {error, term()}

set with xx(only set key already exist) and expire

start_link/1

start_link(C) -> any()

terminate/2

terminate(Reason, State) -> any()


Generated by EDoc