index

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(s string) []byte

func Stringer

func Stringer(s fmt.Stringer) []byte

Types

type Key

type Key = []byte

func Bool

func Bool(b bool) Key

func Int

func Int(n int) Key

func NetIP

func NetIP(ip net.IP) Key

func NetIPAddr

func NetIPAddr(addr netip.Addr) Key

func NetIPPrefix

func NetIPPrefix(prefix netip.Prefix) Key

func Uint16

func Uint16(n uint16) Key

func Uint64

func Uint64(n uint64) Key

type KeySet

type KeySet struct {
	// contains filtered or unexported fields
}

KeySet is a sequence of (length, byte slice) pairs. length is encoded as 16-bit big-endian unsigned int.

func NewKeySet

func NewKeySet(keys ...Key) KeySet

func StringMap

func StringMap[V any](m map[string]V) KeySet

func StringSlice

func StringSlice(ss []string) KeySet

func StringerSlice

func StringerSlice[T fmt.Stringer](ss []T) KeySet

func (*KeySet) Append

func (ks *KeySet) Append(k Key)

func (KeySet) Exists

func (ks KeySet) Exists(k Key) bool

func (KeySet) First

func (ks KeySet) First() Key

func (KeySet) Foreach

func (ks KeySet) Foreach(fn func(Key))

Jump to

Keyboard shortcuts

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