Documentation ¶
Index ¶
- func ByteToBase10(b []byte) (n uint64, err error)
- func IsValidChannelName(name string) bool
- func IsValidTopicName(name string) bool
- func SendFramedResponse(w io.Writer, frameType int32, data []byte) (int, error)
- func SendResponse(w io.Writer, data []byte) (int, error)
- func TCPServer(listener net.Listener, handler TCPHandler)
- type ChildErr
- type ClientErr
- type FatalClientErr
- type Protocol
- type TCPHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToBase10 ¶
func IsValidChannelName ¶
IsValidChannelName checks a channel name for correctness
func IsValidTopicName ¶
IsValidTopicName checks a topic name for correctness
func SendFramedResponse ¶
SendFramedResponse is a server side utility function to prefix data with a length header and frame header and write to the supplied Writer
func SendResponse ¶
SendResponse is a server side utility function to prefix data with a length header and write to the supplied Writer
func TCPServer ¶
func TCPServer(listener net.Listener, handler TCPHandler)
Types ¶
type ClientErr ¶
ClientErr provides a way for NSQ daemons to log a human reabable error string and return a machine readable string to the client.
see docs/protocol.md for error codes by command
func NewClientErr ¶
NewClientErr creates a ClientErr with the supplied human and machine readable strings
type FatalClientErr ¶
func NewFatalClientErr ¶
func NewFatalClientErr(parent error, code string, description string) *FatalClientErr
NewClientErr creates a ClientErr with the supplied human and machine readable strings
func (*FatalClientErr) Error ¶
func (e *FatalClientErr) Error() string
Error returns the machine readable form
func (*FatalClientErr) Parent ¶
func (e *FatalClientErr) Parent() error
Parent returns the parent error