Documentation ¶
Index ¶
- func Dial(addr string, linker Linker) error
- func Listen(addr, prot string, linkerFunc NewLinkerFunc) error
- type Buffer
- type BufferReader
- type BufferWriter
- type Context
- type Data
- type EncContext
- type Encoding
- type Error
- type GenContext
- type Handler
- type HandlerFunc
- type Linker
- type Meta
- type MetaType
- type Mux
- type NewLinkerFunc
- type Packet
- type Protocol
- type Request
- type ResponseWriter
- type WriteItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
func Listen(addr, prot string, linkerFunc NewLinkerFunc) error
Types ¶
type Buffer ¶
func NewBufferString ¶
type BufferReader ¶
type BufferWriter ¶
type EncContext ¶
func NewEncContext ¶
func NewEncContext(metaEnc, bodyEnc Encoding) *EncContext
type Encoding ¶
type Encoding interface { Encode(w BufferWriter, v interface{}) error Decode(r *bytes.Reader, v interface{}) error }
type GenContext ¶
type GenContext func() Context
type Handler ¶
type Handler interface { GetHandler(path string) (handler HandlerFunc) HandleFunc(path string, handlerFunc HandlerFunc) ListPath() []string }
type HandlerFunc ¶
type HandlerFunc func(ResponseWriter, *Request)
type Meta ¶
type Meta struct { Type MetaType `json:"type"` Version int `json:"version,omitempty"` Seq uint64 `json:"seq"` Path string `json:"path,omitempty"` Error string `json:"error,omitempty"` }
func NewMetaError ¶
func NewReqMeta ¶
func NewRespMeta ¶
type NewLinkerFunc ¶
type NewLinkerFunc func() Linker
type Request ¶
type Request struct { Gtx Context Ctx *EncContext Data *Data Meta *Meta }
func NewRequest ¶
func NewRequest(p *Packet, ctx *EncContext, gtx Context) *Request
type ResponseWriter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.