Documentation

Overview

    Package grpc provides a grpc codec

    Index

    Constants

    This section is empty.

    Variables

    View Source
    var (
    	MaxMessageSize = 1024 * 1024 * 4 // 4Mb
    
    )

    Functions

    func NewCodec

    func NewCodec(c io.ReadWriteCloser) codec.Codec

    Types

    type Codec

    type Codec struct {
    	Conn        io.ReadWriteCloser
    	ContentType string
    }

    func (*Codec) Close

    func (c *Codec) Close() error

    func (*Codec) ReadBody

    func (c *Codec) ReadBody(b interface{}) error

    func (*Codec) ReadHeader

    func (c *Codec) ReadHeader(m *codec.Message, t codec.MessageType) error

    func (*Codec) String

    func (c *Codec) String() string

    func (*Codec) Write

    func (c *Codec) Write(m *codec.Message, b interface{}) error

    Source Files