Documentation ¶
Index ¶
- func AllCombinationsUint32(parts [][]uint32) (out [][]uint32)
- func AtomicBumpInt64(loc *int64, newVal int64)
- func AtomicBumpUint32(loc *uint32, newVal uint32)
- func DecompressGzip(r io.Reader) (string, error)
- func IsDigit(r byte) bool
- func Lcm(vals []uint32) uint32
- func Max(a, b uint32) uint32
- func MaxInt(a, b int) int
- func Min(a, b uint32) uint32
- func NaturalLess(s, t string) bool
- func ParseIngestFromFlags(ingestFromStr string) (map[uint32]int64, error)
- func ReadEntry(TomlFilename string, EntryName string) interface{}
- func RegisterFlags(rs ...Registerer)
- func TS(ts interface{}) string
- func TimeBoundWithCacheFunc(fn func() interface{}, timeout, maxAge time.Duration) func() interface{}
- type BufferPool
- type BufferPool33
- type Int64SliceFlag
- type Limiter
- type NaturalSortStringSlice
- type Registerer
- type StringHash32
- type StringHash64
- type Sum32aStringWriter
- func (s *Sum32aStringWriter) BlockSize() int
- func (s *Sum32aStringWriter) Reset()
- func (s *Sum32aStringWriter) Size() int
- func (s *Sum32aStringWriter) Sum(in []byte) []byte
- func (s *Sum32aStringWriter) Sum32() uint32
- func (s *Sum32aStringWriter) Write(data []byte) (int, error)
- func (s *Sum32aStringWriter) WriteString(data string) (int, error)
- type Sum64aStringWriter
- func (s *Sum64aStringWriter) BlockSize() int
- func (s *Sum64aStringWriter) Reset()
- func (s *Sum64aStringWriter) Size() int
- func (s *Sum64aStringWriter) Sum(in []byte) []byte
- func (s *Sum64aStringWriter) Sum64() uint64
- func (s *Sum64aStringWriter) Write(data []byte) (int, error)
- func (s *Sum64aStringWriter) WriteString(data string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllCombinationsUint32 ¶
AllCombinationsUint32 returns all combinations of the input
func AtomicBumpInt64 ¶
AtomicBumpInt64 assures the given address stores the highest int64 between the current value, the value provided and the value provided by any other concurrently executing call
func AtomicBumpUint32 ¶
AtomicBumpUint32 assures the given address stores the highest uint32 between the current value, the value provided and the value provided by any other concurrently executing call
func NaturalLess ¶
NaturalLess compares strings lexicographically *except* substrings of numbers are sorted numerically
func ParseIngestFromFlags ¶
func RegisterFlags ¶
func RegisterFlags(rs ...Registerer)
RegisterFlags registers flags with the provided Registerers
func TimeBoundWithCacheFunc ¶
func TimeBoundWithCacheFunc(fn func() interface{}, timeout, maxAge time.Duration) func() interface{}
TimeBoundWithCacheFunc decorates a function that has a return value in order to bound its execution time. When the decorated function is called, if the original function takes more than 'timeout' to execute, the returned value will be the value returned by a previous call. If no previous call was performed, the call will block until the original function returns.
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func NewBufferPool ¶
func NewBufferPool() *BufferPool
func (*BufferPool) Get ¶
func (b *BufferPool) Get() []byte
func (*BufferPool) Put ¶
func (b *BufferPool) Put(buf []byte)
type BufferPool33 ¶
type BufferPool33 struct {
// contains filtered or unexported fields
}
BufferPool33 is a pool that returns cap=33 len=0 byte slices
func NewBufferPool33 ¶
func NewBufferPool33() *BufferPool33
func (*BufferPool33) Get ¶
func (b *BufferPool33) Get() []byte
func (*BufferPool33) Put ¶
func (b *BufferPool33) Put(buf []byte)
type Int64SliceFlag ¶
type Int64SliceFlag []int64
func (*Int64SliceFlag) Set ¶
func (i *Int64SliceFlag) Set(value string) error
func (*Int64SliceFlag) String ¶
func (i *Int64SliceFlag) String() string
type Limiter ¶
type Limiter chan struct{}
Limiter provides a mechanism for limiting concurrency. Users need to call Acquire() before starting work and Release() when the work is done. Acquire() will block if the Limiters limit has already been reached and unblock when another thread calls Release(), or the passed context is canceled.
type NaturalSortStringSlice ¶
type NaturalSortStringSlice []string
NaturalSortStringSlice sorts strings lexicographically *except* substrings of numbers are sorted numerically
func (NaturalSortStringSlice) Len ¶
func (ss NaturalSortStringSlice) Len() int
func (NaturalSortStringSlice) Less ¶
func (ss NaturalSortStringSlice) Less(i, j int) bool
func (NaturalSortStringSlice) Swap ¶
func (ss NaturalSortStringSlice) Swap(i, j int)
type Registerer ¶
Registerer is a thing that can RegisterFlags
type StringHash32 ¶
func NewFnv32aStringWriter ¶
func NewFnv32aStringWriter() StringHash32
type StringHash64 ¶
func NewFnv64aStringWriter ¶
func NewFnv64aStringWriter() StringHash64
type Sum32aStringWriter ¶
type Sum32aStringWriter uint32
Sum32aStringWriter is mostly a copy of fnv.sum32a the only difference is the additional method WriteString(), due to this additional method it satisfies the io.StringWriter interface which can prevent unnecessary conversions to/from byte slices
func (*Sum32aStringWriter) BlockSize ¶
func (s *Sum32aStringWriter) BlockSize() int
func (*Sum32aStringWriter) Reset ¶
func (s *Sum32aStringWriter) Reset()
func (*Sum32aStringWriter) Size ¶
func (s *Sum32aStringWriter) Size() int
func (*Sum32aStringWriter) Sum ¶
func (s *Sum32aStringWriter) Sum(in []byte) []byte
func (*Sum32aStringWriter) Sum32 ¶
func (s *Sum32aStringWriter) Sum32() uint32
func (*Sum32aStringWriter) WriteString ¶
func (s *Sum32aStringWriter) WriteString(data string) (int, error)
type Sum64aStringWriter ¶
type Sum64aStringWriter uint64
Sum64aStringWriter is mostly a copy of fnv.sum64a the only difference is the additional method WriteString(), due to this additional method it satisfies the io.StringWriter interface which can prevent unnecessary conversions to/from byte slices
func (*Sum64aStringWriter) BlockSize ¶
func (s *Sum64aStringWriter) BlockSize() int
func (*Sum64aStringWriter) Reset ¶
func (s *Sum64aStringWriter) Reset()
func (*Sum64aStringWriter) Size ¶
func (s *Sum64aStringWriter) Size() int
func (*Sum64aStringWriter) Sum ¶
func (s *Sum64aStringWriter) Sum(in []byte) []byte
func (*Sum64aStringWriter) Sum64 ¶
func (s *Sum64aStringWriter) Sum64() uint64
func (*Sum64aStringWriter) WriteString ¶
func (s *Sum64aStringWriter) WriteString(data string) (int, error)