types

package
Version: v0.0.0-...-8817f42 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Byter

type Byter interface {
	ToByte() []byte
	FromByte(v []byte) error
	Key() []byte
	SetKey(k []byte) error
}

type Classifer

type Classifer interface {
	Hit(Hash) bool
	NamePrefix() string
}

type DBer

type DBer interface {
	NewHashGeter(sub string) SessionedGeter
}

type Hash

type Hash plumbing.Hash
var ZeroHash Hash

func (Hash) String

func (h Hash) String() string

type Index

type Index uint64

func ToIndex

func ToIndex(k KeyPart, o uint32) Index

type Indexes

type Indexes []Index

func IndexFromFile

func IndexFromFile(r io.Reader) (ids Indexes, err error)

func (Indexes) Find

func (ids Indexes) Find(k KeyPart) (r []uint32)

func (Indexes) FindFirst

func (ids Indexes) FindFirst(i Index) int

func (Indexes) Len

func (ids Indexes) Len() int

func (Indexes) Less

func (ids Indexes) Less(i, j int) bool

func (Indexes) Swap

func (ids Indexes) Swap(i, j int)

func (Indexes) ToFile

func (ids Indexes) ToFile(w io.Writer) error

type IntCounter

type IntCounter struct {
	Len   int
	C     []int64
	Total int64
}

func NewIntCounter

func NewIntCounter(l int) *IntCounter

func (*IntCounter) Count32

func (ic *IntCounter) Count32(a uint32) int

func (*IntCounter) Count64

func (ic *IntCounter) Count64(a int64) int

func (*IntCounter) Count64Other

func (ic *IntCounter) Count64Other(a, b int64) int

func (*IntCounter) Dump

func (ic *IntCounter) Dump()

type KeyPart

type KeyPart [4]byte

func FromIndex

func FromIndex(i Index) (k KeyPart, o uint32)

type OffPart

type OffPart uint32

type PackDataGeter

type PackDataGeter interface {
	Get(Hash) ([]byte, Hash, error)
}

type SessionedGeter

type SessionedGeter interface {
	NextGroup(prefixlen int, newitem func() Byter) (items []Byter, err error)
	End()
}

Jump to

Keyboard shortcuts

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