package
0.4.1
Repository: https://github.com/sahib/brig.git
Documentation: pkg.go.dev

# Packages

Package conductor is a small helper to execute work heavy operations in the backgrounds that deliver partial results ("result streaming").
No description provided by the author
Package log implements utility methods for logging in a colorful manner.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package trie implements a general purpose Path-*Node.

# Functions

Clamp limits x to the range [lo, hi].
Closer closes c.
CopyFile simply copies the file at `src` to `dst`.
DeriveKey derives a key from password and salt being keyLen bytes long.
FindFreePort asks the operating system for a free port.
LimitWriter is like io.LimitReader but for an io.Writer.
Max returns the maximum of a and b.
Max64 returns the maximum of a and b.
Min returns the minimum of a and b.
Min64 returns the minimum of a and b.
NewTimeoutReader wraps `r` and returns a io.Reader that times out after `d` elapsed with ErrTimeout if `r` didn't succeed in that time.
NewTimeoutReadWriter wraps `rw` and returns a io.ReadWriter that times out after `d` elapsed with ErrTimeout if `rw` didn't succeed in that time.
NewTimeoutWriter wraps `w` and returns a io.Writer that times out after `d` elapsed with ErrTimeout if `w` didn't succeed in that time.
NopWriteCloser returns a WriteCloser with a no-op Close method wrapping the provided Writer w.
OmitBytes converts a byte slice into a string representation that omits data in the middle if necessary.
PeekHeader returns a new reader that will yield the very same data as `r`.
SyncedReadWriter returns a io.ReadWriter that protects each call to Read() and Write() with a sync.Mutex.
Tar packs all files in the directory pointed to by `root` and writes a gzipped and tarred version of it to `w`.
Touch works like the unix touch(1).
UClamp limits x to the range [lo, hi].
UMax returns the unsigned minimum of a and b.
UMin returns the unsigned minimum of a and b.
Untar reads .tar data (from Tar()) from `r` and writes all files packed in it to `root`.

# Variables

ErrTimeout will be returned by Read/Write in case of a timeout.

# Structs

Empty is just an empty struct.
SizeAccumulator is a io.Writer that simply counts the amount of bytes that has been written to it.
SyncBuffer is a bytes.Buffer that protects each call to Read() and Write() with a sync.RWMutex, i.e.
TimeoutReadWriter is io.ReadWriter capable of returning ErrTimeout if there was no result in a certain timeout period.

# Type aliases

Errors is a list of errors that render to one single message.