Documentation ¶
Index ¶
- func HashAll(h hash.Hasher, identifiers <-chan []byte) <-chan hashPair
- func HashAllParallel(h hash.Hasher, identifiers <-chan []byte) <-chan hashPair
- func HashRead(r io.Reader, u *uint64) (err error)
- func HashWrite(w io.Writer, u uint64) error
- func ReadAll(r io.Reader, n int64) <-chan uint64
- type Receiver
- type Sender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashAll ¶
HashAll reads all identifiers from identifiers and hashes them until identifiers closes
func HashAllParallel ¶
HashAllParallel reads all identifiers from identifiers and parallel hashes them until identifiers closes
Types ¶
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver represents the receiver side of the NPSI protocol
func NewReceiver ¶
func NewReceiver(rw io.ReadWriter) *Receiver
NewReceiver returns a receiver initialized to use rw as a buffered communication layer
func (*Receiver) Intersect ¶
func (r *Receiver) Intersect(ctx context.Context, n int64, identifiers <-chan []byte) ([][]byte, error)
Intersect intersects on matchables read from the identifiers channel, returning the matching intersection, using the NPSI protocol. The format of an indentifier is
string
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender represents sender side of the NPSI protocol
func NewSender ¶
func NewSender(rw io.ReadWriter) *Sender
NewSender returns a sender initialized to use rw as the communication layer
Click to show internal directories.
Click to hide internal directories.