package
0.1.4
Repository: https://github.com/uber/kraken.git
Documentation: pkg.go.dev

# Functions

ConfigFixture returns a Config for testing.
Fixture returns a single local Conn for testing.
HandshakerFixture returns a Handshaker for testing.
NewAnnouncePieceMessage returns a Message for announcing a piece.
NewCompleteMessage returns a Message for a completed torrent.
NewErrorMessage returns a Message for indicating an error.
NewFakePeer creates and starts a new FakePeer.
NewHandshaker creates a new Handshaker.
NewPiecePayloadMessage returns a Message for sending a piece payload.
NewPieceRequestMessage returns a Message for requesting a piece.
PipeFixture returns Conns for both sides of a live connection for testing.

# Structs

Config is the configuration for individual live connections.
Conn manages peer communication over a connection for multiple torrents.
FakePeer is a testing utility which reciprocates handshakes against arbitrary incoming connections, parroting back the requested torrent but with an empty bitfield (so no pieces are requested).
Handshaker defines the handshake protocol for establishing connections to other peers.
HandshakeResult wraps data returned from a successful handshake.
Message joins a protobuf message with an optional payload.
PendingConn represents half-opened, pending connection initialized by a remote peer.

# Interfaces

Events defines Conn events.

# Type aliases

RemoteBitfields represents the bitfields of an agent's peers for a given torrent.