Documentation ¶
Overview ¶
package admproto describes the admission protocol
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Error = errs.Class("admproto")
Error wraps all of the errors coming out of admproto.
Functions ¶
func AddChecksum ¶
AddChecksum appends a checksum to the byte slice.
func CheckChecksum ¶
CheckChecksum removes an appended checksum and errors if either it cannot or if the checksum does not match.
Types ¶
type FloatEncoding ¶
type FloatEncoding int
FloatEncoding controls different types of encodings of floating point values.
const ( Float16Encoding FloatEncoding = iota Float32Encoding Float64Encoding )
type Options ¶
type Options struct { // FloatEncoding is what kind of encoding to use for the floating point // values. The default is to use float16. FloatEncoding FloatEncoding }
Options controls options for the Writer.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader iterates over the key/value pairs in a buffer written by a Writer.
func NewReaderWith ¶
NewReaderWith returns a Reader with some given scratch space as a buffer to avoid allocations.
func (*Reader) Begin ¶
Begin returns the header information out of the packet, and the remaining data in the packet.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a type for encoding key/value pairs to a byte buffer.
func NewWriterWith ¶
NewWriterWith returns a Writer with the passed in options rather than the defaults.
func (*Writer) Append ¶
Append adds the key and value to the buffer using the last Append calls to reduce the amount of data it needs to write.