Documentation ¶
Index ¶
Constants ¶
View Source
const ( Debug = iota Conn Error Fatal )
Message levels control which messages will be sent to h.Msgr
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // transmission sequence id Seq uint32 // contains filtered or unexported fields }
Client is a Petrel client instance.
func UnixClient ¶
UnixClient returns a Client which uses Unix domain sockets.
func (*Client) DispatchRaw ¶
DispatchRaw sends a pre-encoded transmission and returns the response.
type Config ¶ added in v0.34.0
type Config struct { // For Unix clients, Addr takes the form "/path/to/socket". For // TCP clients, it is either an IPv4 or IPv6 address followed by // the desired port number ("127.0.0.1:9090", "[::1]:9090"). Addr string // Timeout is the number of milliseconds the client will wait // before timing out due to on a Dispatch() or Read() // call. Default (zero) is no timeout. Timeout int64 //HMACKey is the secret key used to generate MACs for signing //and verifying messages. Default (nil) means MACs will not be //generated for messages sent, or expected for messages //received. HMACKey []byte }
Config holds values to be passed to the client constructor.
Click to show internal directories.
Click to hide internal directories.