Documentation ¶
Index ¶
Constants ¶
View Source
const HEADER_LEN = 4
View Source
const PROROCOL_LEN = 4
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
func NewRequest(content []byte, num BigcacheProtocol) []byte
func NewResponse ¶
func NewResponse(msg string, errcode errcode.BigcacheError) []byte
Types ¶
type BigcacheProtocol ¶
type BigcacheProtocol int
BigcacheProtocol 传输协议号.
const ( CONN_AUTH BigcacheProtocol = 1000 //连接授权. READ BigcacheProtocol = 1001 //获取一条记录. WRITE BigcacheProtocol = 1002 //写入一条记录. DELETE BigcacheProtocol = 1003 //删除一条记录. MSG BigcacheProtocol = 1004 //发生一条状态消息. ADD_NODE BigcacheProtocol = 1005 //新增加节点. REMOVE_NODE BigcacheProtocol = 1006 //删除节点. GET_CACHE_SERVER_ALL BigcacheProtocol = 1007 //获取所有的cache server 节点. )
type Request ¶
type Request struct { Protocol BigcacheProtocol Size int64 Body []byte }
type Response ¶
type Response struct { Protocol BigcacheProtocol Size int64 Body []byte Msg string Err errcode.BigcacheError }
Click to show internal directories.
Click to hide internal directories.