Documentation
¶
Index ¶
- Constants
- func GetHostPrivateKey(h host.Host) crypto.PrivKey
- func NewHost(ctx context.Context, opts HostOptions) (host.Host, error)
- func ProviderStreamHandler(store *engine.ChunkStore) network.StreamHandler
- func RequestChunk(ctx context.Context, h host.Host, providerID peer.ID, fileID [32]byte, ...) ([]byte, error)
- type HostOptions
Constants ¶
View Source
const ProtocolID = "/cipher/v5/chunk/1.0.0"
Variables ¶
This section is empty.
Functions ¶
func GetHostPrivateKey ¶
GetHostPrivateKey returns the private key for the given host.
func ProviderStreamHandler ¶
func ProviderStreamHandler(store *engine.ChunkStore) network.StreamHandler
ProviderStreamHandler adapts the engine to a libp2p stream.
Types ¶
Click to show internal directories.
Click to hide internal directories.