Documentation ¶
Index ¶
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 ¶
View Source
var UnsupportedTopic = errors.New("unsupported topic")
Functions ¶
func NewStdLogger ¶ added in v1.2.0
func NewStdLogger() (l *stdLogger)
Types ¶
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)
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 Limiter ¶ added in v1.2.0
type Limiter struct { Timeout // contains filtered or unexported fields }
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) SetContext ¶ added in v1.2.4
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.