Documentation
¶
Overview ¶
Package presence holds the Bloom filter an agent consults before uploading a blob: a positive answer is probably right, a negative one is certain.
Index ¶
Constants ¶
View Source
const FalsePositiveRate = 0.01
FalsePositiveRate is what filters are sized for.
View Source
const Version = 1
Version is the format written by Proto.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
// Commit and Set say which commit the filter was built from.
Commit *proto.Ref
Set string
// contains filtered or unexported fields
}
Filter is a Bloom filter over refs.
func FromProto ¶
func FromProto(p *proto.PresenceFilter) (*Filter, error)
FromProto decodes a filter written by Proto.
func (*Filter) Proto ¶
func (f *Filter) Proto() *proto.PresenceFilter
Proto encodes the filter for storage and transport.
Click to show internal directories.
Click to hide internal directories.