Documentation
¶
Index ¶
- Constants
- Variables
- type AddAddressesdeprecated
- type Commanddeprecated
- type Filter
- type FilterParam
- type Filterer
- type Float64
- type NewBloomdeprecated
- type NewSetdeprecated
- type Server
- func New(log log.Logger) *Serverdeprecated
- type Uint64
Constants ¶
const ( // MaxBytes the max number of bytes for a filter MaxBytes = 1 * constants.MiB // MaxAddresses the max number of addresses allowed MaxAddresses = 10000 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AddAddresses
deprecated
type AddAddresses struct {
api.JSONAddresses
// contains filtered or unexported fields
}
AddAddresses command to add addresses
Deprecated: The pubsub server is deprecated.
type Command
deprecated
type Command struct {
NewBloom *NewBloom `json:"newBloom,omitempty"`
NewSet *NewSet `json:"newSet,omitempty"`
AddAddresses *AddAddresses `json:"addAddresses,omitempty"`
}
Command execution command
Deprecated: The pubsub server is deprecated.
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 Float64 ¶
type Float64 float64
Float64 is a float64 that JSON marshals as a quoted decimal string.
func (Float64) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Float64) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type NewBloom
deprecated
type NewBloom struct {
// MaxElements size of bloom filter
MaxElements Uint64 `json:"maxElements"`
// CollisionProb expected error rate of filter
CollisionProb Float64 `json:"collisionProb"`
}
NewBloom command for a new bloom filter
Deprecated: The pubsub server is deprecated.
func (*NewBloom) IsParamsValid ¶
type NewSet
deprecated
type NewSet struct{}
NewSet command for a new map set
Deprecated: The pubsub server is deprecated.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server maintains the set of active clients and sends messages to the clients.
type Uint64 ¶
type Uint64 uint64
Uint64 is a uint64 that JSON marshals as a quoted decimal string. Used at the JSON-RPC boundary where JS clients lose precision on integers > 2^53.
func (Uint64) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Uint64) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.