snapmsg

package
v0.0.0-...-be83826 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2019 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteMsgHeader

func WriteMsgHeader(w io.Writer, key string, contentLen uint64) error

WriteMsgHeader writes the header of a "binary PUT message" to `w`

func WriteReader

func WriteReader(w io.Writer, key string, r io.Reader) error

WriteString writes a "binary PUT message" to `w` with key `key`. `r` is copied to `w` as the contents of the message. Note that this function cannot determine the number of bytes in `r` without first reading it; `r` is read completely into a temporary buffer before being copied to `w`. Note that this function writes the header; users should not call both WriteMsgHeader and WriteReader.

func WriteString

func WriteString(w io.Writer, key, value string) error

WriteString writes a "binary PUT message" to `w` with key `key` and contents `value`. Note that this function writes the header; users should not call both WriteMsgHeader and WriteString.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL