Documentation ¶
Index ¶
- Constants
- Variables
- func NewStdLogger() (l *stdLogger)
- type CipherKey
- type Client
- type ClientSettings
- type Conn
- type CryptCipherKey
- type CryptMessage
- type Data
- func (d *Data) GetBytes() (bs []byte)
- func (d *Data) GetGob(val interface{}) (err error)
- func (d *Data) GetJson(val interface{}) (err error)
- func (d *Data) SetBytes(bs []byte)
- func (d *Data) SetGob(val interface{}) (err error)
- func (d *Data) SetJson(val interface{}) (err error)
- func (d *Data) String() (str string)
- type Handler
- type HandlerType
- type Limiter
- type Logger
- type Message
- type Metrics
- type Package
- type PackageType
- type PrivateKey
- type PublicKey
- type RSA
- 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 NewStdLogger ¶ added in v1.2.0
func NewStdLogger() (l *stdLogger)
Types ¶
type CipherKey ¶ added in v1.3.2
type CipherKey []byte
func NewCipherKey ¶ added in v1.3.2
type Client ¶ added in v1.2.0
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SetSettings ¶ added in v1.3.9
func (c *Client) SetSettings(stg *ClientSettings)
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)
type Conn ¶ added in v1.2.0
func (*Conn) ReadPackage ¶ added in v1.3.3
func (*Conn) WritePackage ¶ added in v1.3.3
type CryptCipherKey ¶ added in v1.3.2
type CryptCipherKey []byte
type CryptMessage ¶ added in v1.3.1
type CryptMessage []byte
type HandlerType ¶ added in v1.2.5
type HandlerType uint
type Limiter ¶ added in v1.2.0
type Limiter struct { Timeout // contains filtered or unexported fields }
type Package ¶ added in v1.3.3
type Package struct { Type PackageType Data }
type PackageType ¶ added in v1.3.3
type PackageType uint8
const ( Handshake PackageType = iota Exchange Error )
type PrivateKey ¶ added in v1.3.1
type PrivateKey struct {
// contains filtered or unexported fields
}
func (PrivateKey) Decode ¶ added in v1.3.1
func (pk PrivateKey) Decode(cck CryptCipherKey) (ck CipherKey, err error)
type RSA ¶ added in v1.3.1
type RSA struct {
// contains filtered or unexported fields
}
func (*RSA) PrivateKey ¶ added in v1.3.1
func (r *RSA) PrivateKey() (pk PrivateKey)
type Server ¶ added in v1.2.0
type Server struct {
// contains filtered or unexported fields
}
func (*Server) SetContext ¶ added in v1.2.4
func (*Server) SetSettings ¶ added in v1.3.9
func (s *Server) SetSettings(stg *ServerSettings)
type ServerSettings ¶ added in v1.2.0
type ServerSettings struct {
Limiter
}
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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.