Documentation ¶
Overview ¶
Package rpc implements the rpc layer for the bloomfilter, following the principles from https://golang.org/pkg/net/rpc
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoBloomfilterInitialized = fmt.Errorf("Bloomfilter not initialized")
)
ErrNoBloomfilterInitialized error
Functions ¶
This section is empty.
Types ¶
type AddOutput ¶
type AddOutput struct {
Count int
}
AddOutput type for an array of elements to a sliding bloomfilter set
type Bloomfilter ¶
type Bloomfilter struct {
BloomfilterRPC
}
Bloomfilter wrapper for BloomfilterRPC type
func New ¶
func New(ctx context.Context, cfg Config) *Bloomfilter
New rpc layer implementation of creating a sliding bloomfilter set
func (Bloomfilter) Bloomfilter ¶
func (Bloomfilter) Bloomfilter() *rotate.Bloomfilter
Bloomfilter getter
type BloomfilterRPC ¶
type BloomfilterRPC int
BloomfilterRPC type
func (BloomfilterRPC) Add ¶
func (BloomfilterRPC) Add(in AddInput, out *AddOutput) error
Add rpc layer implementation of an array of elements to a sliding bloomfilter set
func (BloomfilterRPC) Check ¶
func (BloomfilterRPC) Check(in CheckInput, out *CheckOutput) error
Check rpc layer implementation of an array of elements in a sliding bloomfilter set
func (BloomfilterRPC) Union ¶
func (BloomfilterRPC) Union(in UnionInput, out *UnionOutput) error
Union rpc layer implementation of two sliding bloomfilter sets
type CheckInput ¶
type CheckInput struct {
Elems [][]byte
}
CheckInput type for an array of elements
type CheckOutput ¶
type CheckOutput struct {
Checks []bool
}
CheckOutput type for check result of an array of elements in a sliding bloomfilter set
type UnionInput ¶
type UnionInput struct {
BF *rotate.Bloomfilter
}
UnionInput type for sliding bloomfilter set
type UnionOutput ¶
type UnionOutput struct {
Capacity float64
}
UnionOutput type for sliding bloomfilter set fill degree
Directories ¶
Path | Synopsis |
---|---|
Package client implements an rpc client for the bloomfilter, along with Add and Check methods.
|
Package client implements an rpc client for the bloomfilter, along with Add and Check methods. |
Package server implements an rpc server for the bloomfilter, registering a bloomfilter and accepting a tcp listener.
|
Package server implements an rpc server for the bloomfilter, registering a bloomfilter and accepting a tcp listener. |