Documentation ¶
Index ¶
- Constants
- Variables
- func Decode(bs []byte) (val interface{}, err error)
- func Encode(val interface{}) (bs []byte, err error)
- func MustDecode(bs []byte) (val interface{})
- func MustEncode(val interface{}) (bs []byte)
- func NewStdLogger() (l *stdLogger)
- type BytesHandler
- type Client
- type ClientSettings
- type Conn
- type HandlerType
- type Limiter
- type Logger
- type Message
- type Metrics
- type ObjectHandler
- type Retry
- type Server
- type ServerSettings
- type TCP
- type Timeout
Constants ¶
View Source
const ( DefaultConnTimeout = 250 * time.Millisecond DefaultHandleTimeout = 250 * time.Millisecond )
View Source
const ( DefaultRetries = 3 DefaultDelayTimeout = 50 * time.Millisecond )
View Source
const DefaultBodyLimit = 1024
Variables ¶
Functions ¶
func MustDecode ¶ added in v1.2.5
func MustDecode(bs []byte) (val interface{})
func MustEncode ¶ added in v1.2.5
func MustEncode(val interface{}) (bs []byte)
func NewStdLogger ¶ added in v1.2.0
func NewStdLogger() (l *stdLogger)
Types ¶
type BytesHandler ¶ added in v1.2.5
type Client ¶ added in v1.2.0
type Client struct { TCP ClientSettings // contains filtered or unexported fields }
func NewClient ¶ added in v1.2.0
func NewClient(tcp TCP, stg ClientSettings) (c *Client)
func (*Client) SendObject ¶ added in v1.2.5
type ClientSettings ¶ added in v1.2.0
func NewClientSettings ¶ added in v1.2.0
func NewClientSettings() (stg ClientSettings)
func (*ClientSettings) SetBodyLimit ¶ added in v1.2.2
func (stg *ClientSettings) SetBodyLimit(limit uint)
func (*ClientSettings) SetConnTimeout ¶ added in v1.2.0
func (stg *ClientSettings) SetConnTimeout(dur time.Duration)
func (*ClientSettings) SetLogger ¶ added in v1.2.0
func (stg *ClientSettings) SetLogger(l Logger)
type HandlerType ¶ added in v1.2.5
type HandlerType uint
const ( BytesHandlerType HandlerType = iota ObjectHandlerType )
type Limiter ¶ added in v1.2.0
type Limiter struct { Timeout // contains filtered or unexported fields }
type ObjectHandler ¶ added in v1.2.5
type Server ¶ added in v1.2.0
type Server struct { TCP ServerSettings // contains filtered or unexported fields }
func NewServer ¶ added in v1.2.0
func NewServer(tcp TCP, stg ServerSettings) (s *Server)
func (*Server) SetBytesHandle ¶ added in v1.2.6
func (s *Server) SetBytesHandle(topic string, bh BytesHandler)
func (*Server) SetContext ¶ added in v1.2.4
func (*Server) SetObjectHandle ¶ added in v1.2.6
func (s *Server) SetObjectHandle(topic string, oh ObjectHandler)
type ServerSettings ¶ added in v1.2.0
func NewServerSettings ¶ added in v1.2.0
func NewServerSettings() (stg ServerSettings)
func (*ServerSettings) SetBodyLimit ¶ added in v1.2.2
func (stg *ServerSettings) SetBodyLimit(limit uint)
func (*ServerSettings) SetConnTimeout ¶ added in v1.2.0
func (stg *ServerSettings) SetConnTimeout(dur time.Duration)
func (*ServerSettings) SetHandleTimeout ¶ added in v1.2.0
func (stg *ServerSettings) SetHandleTimeout(dur time.Duration)
func (*ServerSettings) SetLogger ¶ added in v1.2.0
func (stg *ServerSettings) SetLogger(l Logger)
Click to show internal directories.
Click to hide internal directories.