fingerprinter

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	MAX_DEPTH_LEVEL     = 10
	DEFAULT_KEY_FILTERS = []string{"^shardVersion$"}
)

Functions

This section is empty.

Types

type Fingerprint

type Fingerprint struct {
	Namespace   string
	Operation   string
	Collection  string
	Database    string
	Keys        string
	Fingerprint string
}
Example
doc := proto.SystemProfile{}
err := tutil.LoadBson(vars.RootPath+samples+"fingerprinter_doc.json", &doc)
if err != nil {
	panic(err)
}

fp := NewFingerprinter(DEFAULT_KEY_FILTERS)
got, err := fp.Fingerprint(doc)
if err != nil {
	panic(err)
}
fmt.Println(got.Fingerprint)
Output:

FIND sbtest3 c,k,pad

type Fingerprinter

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

func NewFingerprinter

func NewFingerprinter(keyFilters []string) *Fingerprinter

func (*Fingerprinter) Fingerprint

func (f *Fingerprinter) Fingerprint(doc proto.SystemProfile) (Fingerprint, error)

Jump to

Keyboard shortcuts

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