 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const ( // MaxBytes the max number of bytes for a filter MaxBytes = 1 * units.MiB // MaxAddresses the max number of addresses allowed MaxAddresses = 10000 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AddAddresses ¶
type AddAddresses struct {
	api.JSONAddresses
	// contains filtered or unexported fields
}
    AddAddresses command to add addresses
type Command ¶
type Command struct {
	NewBloom     *NewBloom     `json:"newBloom,omitempty"`
	NewSet       *NewSet       `json:"newSet,omitempty"`
	AddAddresses *AddAddresses `json:"addAddresses,omitempty"`
}
    Command execution command
type FilterParam ¶
type FilterParam struct {
	// contains filtered or unexported fields
}
    func NewFilterParam ¶
func NewFilterParam() *FilterParam
func (*FilterParam) Add ¶
func (f *FilterParam) Add(bl ...[]byte) error
func (*FilterParam) Check ¶
func (f *FilterParam) Check(addr []byte) bool
func (*FilterParam) Filter ¶
func (f *FilterParam) Filter() bloom.Filter
func (*FilterParam) Len ¶
func (f *FilterParam) Len() int
func (*FilterParam) NewSet ¶
func (f *FilterParam) NewSet()
type NewBloom ¶
type NewBloom struct {
	// MaxElements size of bloom filter
	MaxElements json.Uint64 `json:"maxElements"`
	// CollisionProb expected error rate of filter
	CollisionProb json.Float64 `json:"collisionProb"`
}
    NewBloom command for a new bloom filter
func (*NewBloom) IsParamsValid ¶
 Click to show internal directories. 
   Click to hide internal directories.