registrator

package
v0.0.0-...-8685a14 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeySizes

func GetKeySizes(ec map[interface{}]int) (unique, total int64)

Types

type Counter

type Counter interface {
	Add(num int) int
	GetScore() int
}

func NewCounter

func NewCounter(initValue int) Counter

type CounterPair

type CounterPair struct {
	Key   interface{}
	Count int
}

type CounterPairsByKey

type CounterPairsByKey []CounterPair

func (CounterPairsByKey) Len

func (c CounterPairsByKey) Len() int

func (CounterPairsByKey) Less

func (c CounterPairsByKey) Less(i, j int) bool

func (CounterPairsByKey) Swap

func (c CounterPairsByKey) Swap(i, j int)

type Encounter

type Encounter interface {
	CheckIn(interface{}) int
	GetScores() map[interface{}]int
	GetCounterPairs() []CounterPair
	KeysCount() int
	TotalCount() int
}

func NewEncounter

func NewEncounter(initCap int) Encounter

type InodeChecksums

type InodeChecksums interface {
	CheckIn(fileStat FileStat) (string, bool, bool, <-chan struct{})
	Update(fileStat FileStat, c string, written int64)
	Delete(fileStat FileStat)
	GetStats() (inodesCount int, totalSize int64)
}

func NewInodeChecksums

func NewInodeChecksums(initCap int) InodeChecksums

type Inofs

type Inofs map[fs.Inode][]fs.FileStat

func (Inofs) GetFileStatSorted

func (m Inofs) GetFileStatSorted() []fs.FileStat

func (Inofs) Length

func (m Inofs) Length() (result int)

type KeySize

type KeySize struct {
	Key  interface{}
	Size int64
}

type Lesser

type Lesser interface {
	Less(interface{}) bool
}

type MCKey

type MCKey struct {
	Mid, Cid string
}

func (MCKey) String

func (dk MCKey) String() string

type Mcifs

type Mcifs map[MCKey]map[Inode][]FileStat

func (Mcifs) Copy

func (v Mcifs) Copy() Mcifs

func (Mcifs) GetKeysSortedByMid

func (v Mcifs) GetKeysSortedByMid() []MCKey

type McifsRegister

type McifsRegister interface {
	CheckIn(fs FileStat, contentKey string) map[Inode][]FileStat
	GetRegs(copy bool) Mcifs
	GetKeysCounter() Encounter
}

func NewMcifsRegister

func NewMcifsRegister(initCap int) McifsRegister

type Mifs

type Mifs map[string]map[Inode][]FileStat

func (*Mifs) Copy

func (r *Mifs) Copy() Mifs

func (*Mifs) GetDupGroupsCount

func (r *Mifs) GetDupGroupsCount() (count int)

func (*Mifs) GetGroupsTotal

func (r *Mifs) GetGroupsTotal() int

type MifsRegister

type MifsRegister interface {
	CheckIn(fs FileStat) map[Inode][]FileStat
	GetRegs(copy bool) Mifs
	GetSizesCounter() Encounter
}

func NewMifsRegister

func NewMifsRegister(initCap int) MifsRegister

Jump to

Keyboard shortcuts

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