Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P2pResp ¶
type P2pResp struct { Code P2pRespStatus `json:"code"` NowAddr string `json:"nowAddr"` TargetAddr string `json:"targetAddr"` Msg string `json:"msg"` }
type P2pRespStatus ¶
type P2pRespStatus int64
const ( Success P2pRespStatus = 0 NotFoundTarget P2pRespStatus = 1 Other P2pRespStatus = -1 )
func (P2pRespStatus) Int64 ¶
func (p P2pRespStatus) Int64() int64
type Request ¶
type Request struct { Type RequestType `json:"type"` Data []byte `json:"data"` }
type RequestType ¶
type RequestType int64
const ( P2p RequestType = 0 Ping RequestType = 1 )
func (RequestType) Int64 ¶
func (p RequestType) Int64() int64
type Response ¶
type Response struct { Type RequestType `json:"type"` Data []byte `json:"data"` }
Click to show internal directories.
Click to hide internal directories.