Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeepConnection = 0 CloseConnection = 1 NoBody = 16 RawBody = 32 ErrorBody = 64 )
View Source
const (
ChunkSize = 655336
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONCodec ¶
type JSONCodec struct {
// contains filtered or unexported fields
}
A JSONCodec implements ServeCodec using 9 bytes data prefixes and body marshaling via json.
func NewJSONCodec ¶
func NewJSONCodec(conn io.ReadWriteCloser) *JSONCodec
NewJSONCodec initiates new JSONCodec over given connection.
func (*JSONCodec) ReadRequestBody ¶
ReadRequestBody fetches prefixed body payload and automatically unmarshal it as json. RawBody flag will populate []byte lice argument for rpc method.
func (*JSONCodec) ReadRequestHeader ¶
ReadRequestHeader request metadata.
Click to show internal directories.
Click to hide internal directories.