package
0.3.2
Repository: https://github.com/jeffrom/logd.git
Documentation: pkg.go.dev

# Functions

BatchEnvelopeSize returns the size of a message body including its protocol envelope.
MessageSize returns the size of the message, including protocol.
NewBatch returns a new instance of a batch.
NewBatchScanner returns a new instance of *BatchScanner.
NewClientBatchResponse returns a successful batch *ClientResponse.
NewClientErrResponse returns an error response.
NewClientMultiResponse returns a successful MOK response.
NewClientOKResponse returns a successful batch *ClientResponse.
No description provided by the author
NewClientResponseConfig creates a new instance of *ClientResponse.
NewCloseRequest returns a new instance of CloseRequest.
NewConfigRequest returns a new instance of ConfigRequest.
No description provided by the author
NewMessage returns a Message MSG <size>\r\n<body>\r\n.
NewRead returns a new instance of a READ request.
NewRequest returns a new, unconfigured instance of *Request.
NewRequestConfig returns a new instance of *Request.
NewResponse returns a new response.
NewResponseConfig returns a new response with configuration.
NewResponseErr returns a new instance of Response and writes it to the request.
NewStatsRequest returns a new instance of StatsRequest.
NewTail returns a new instance of a TAIL request.

# Constants

CmdBatch is a batch command type.
CmdClose is a close command type.
CmdConfig is a CONFIG command type.
CmdRead is the new read request type.
CmdStats returns some internal stats.
CmdTail is similar to READ, except it always starts from the beginning of the log.
MaxTopicSize represents the maximum topic length.
RespEOF indicates a client's read request has been closed by the server.
RespErr indicates a failed response.
RespErrClient indicates a failed response due to client error.
RespOK indicates a successful client request.

# Variables

ErrInternal is a server side error.
ErrInvalid refers to an invalid request.
ErrInvalidOffset is returned when a read is attempted from a batch offset that doesn't point to the beginning of a batch protocol message.
ErrMaxTopics means the maximum number of topics has already been created.
ErrNotFound is returned when the log offset is above the logs head, has been deleted, or does not point to a message batch.
ErrRespEmptyMessage indicates a write was attempted that included no data.
ErrRespInvalid are the error response bytes sent for invalid requests.
ErrRespMaxTopics is the serialized form of ErrMaxTopics.
ErrRespNoArguments indicates no arguments were supplied.
ErrRespNotFound indicates the messages could not be found.
ErrRespServer indicates an internal server error.
ErrRespTooLarge indicates a protocol error.
ErrRespTopicNotAllowed is the serialized form of ErrTopicNotAllowed.
ErrTopicNotAllowed means the maximum number of topics has already been created.

# Structs

Batch represents a collection of Messages BATCH <size> <topic> <checksum> <messages>\r\n<data> NOTE no trailing newline after the data.
BatchScanner can be used to scan through a reader, iterating over batches.
ClientResponse is the response clients receive after making a request.
CloseRequest is an incoming STATS command CLOSE\r\n.
ConfigRequest is an incoming CONFIG command CONFIG\r\n.
ConfigResponse is a representation of the server-side config which is intended as a client multi ok response.
Message is a new message type.
Read represents a read request READ <topic> <offset> <messages>\r\n.
Request represents a single request / response.
Response is a response the conn can use to send bytes back to the client.
StatsRequest is an incoming STATS command STATS\r\n.
Tail represents a TAIL request TAIL <topic> <messages>\r\n.

# Type aliases

CmdType is the type for logd commands.
Error is a client error type.
RespType is the response status return type.