Documentation ¶
Index ¶
- func NewSignInData(m interface{}) signInData
- func NewTestRW() (ResponseWrite, Request, chan []byte, chan bool)
- type Configure
- type DataVerifyType
- type Header
- type Headers
- type Message
- type Request
- type RequestByNsq
- type RequestResponse
- type ResponseWrite
- type ResponseWriteByNsq
- type ServeHandle
- type TestRequest
- func (self *TestRequest) BaseByte() []byte
- func (self *TestRequest) Byte() []byte
- func (self *TestRequest) GetId() uint64
- func (self *TestRequest) GetRoute() string
- func (self *TestRequest) Marshal(info interface{}) (err error)
- func (self *TestRequest) Reset()
- func (self *TestRequest) SetId(id uint64)
- func (self *TestRequest) SetRoute(s string)
- func (self *TestRequest) SetType(id uint16)
- func (self *TestRequest) Type() uint16
- func (self *TestRequest) Unmarshal(but interface{}) error
- type TestResponseWrite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSignInData ¶
func NewSignInData(m interface{}) signInData
Types ¶
type Configure ¶
type Configure struct { HttpHandleUrl string `json:"HttpHandleUrl"` WebsocketHandlerUrl string `json:"WebsocketHandlerUrl"` DataVerify DataVerifyType NadoDefaultHandle Header MessageTimeout time.Duration `json:"MessageTimeout,timeunit:s"` AppKey string `json:"AppKey"` AppSecret string `json:"AppSecret"` NsqConsumerTopic string `json:"NsqConsumerTopic"` NsqProducterTopic string `json:"NsqProducterTopic"` NsqChannel string `json:"NsqChannel"` NsqDefaultHandle Header NsqMaxConsumer int `json:"NsqMaxConsumer"` NsqdLookupds []string `json:"NsqdLookupds"` NsqdAddress string `json:"NsqdAddress"` NsqConfig *nsq.Config OnServeStop func() OnServeStart func() OnConnectStop func(w ResponseWrite, r Request) //当链接中断时的回调函数 }
type Header ¶
type Header func(w ResponseWrite, r Request)
type RequestByNsq ¶
type RequestResponse ¶
type RequestResponse struct { Res ResponseWrite Req Request }
type ResponseWrite ¶
type ResponseWriteByNsq ¶
type ResponseWriteByNsq interface { Write([]byte) error Close() error Copy() ResponseWriteByNsq }
type ServeHandle ¶
type TestRequest ¶
func (*TestRequest) BaseByte ¶
func (self *TestRequest) BaseByte() []byte
func (*TestRequest) Byte ¶
func (self *TestRequest) Byte() []byte
func (*TestRequest) GetId ¶
func (self *TestRequest) GetId() uint64
func (*TestRequest) GetRoute ¶
func (self *TestRequest) GetRoute() string
func (*TestRequest) Marshal ¶
func (self *TestRequest) Marshal(info interface{}) (err error)
func (*TestRequest) Reset ¶
func (self *TestRequest) Reset()
func (*TestRequest) SetId ¶
func (self *TestRequest) SetId(id uint64)
func (*TestRequest) SetRoute ¶
func (self *TestRequest) SetRoute(s string)
func (*TestRequest) SetType ¶
func (self *TestRequest) SetType(id uint16)
func (*TestRequest) Type ¶
func (self *TestRequest) Type() uint16
func (*TestRequest) Unmarshal ¶
func (self *TestRequest) Unmarshal(but interface{}) error
type TestResponseWrite ¶
type TestResponseWrite struct {
// contains filtered or unexported fields
}
func (*TestResponseWrite) Close ¶
func (self *TestResponseWrite) Close() error
func (*TestResponseWrite) Write ¶
func (self *TestResponseWrite) Write(b []byte) error
Click to show internal directories.
Click to hide internal directories.