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)
Click to show internal directories.
Click to hide internal directories.