handlers

package
v0.0.0-...-c7a1919 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDownloadHandler

func AddDownloadHandler(libp2phost host.Host, store stores.Store, canDownloadDag func(rootLeaf *merkle_dag.DagLeaf, pubKey *string, signature *string) bool)

func AddUploadHandler

func AddUploadHandler(libp2phost host.Host, store stores.Store, canUploadDag func(rootLeaf *merkle_dag.DagLeaf, pubKey *string, signature *string) bool, handleRecievedDag func(dag *merkle_dag.Dag, pubKey *string))

func BuildDownloadStreamHandler

func BuildDownloadStreamHandler(store stores.Store, canDownloadDag func(rootLeaf *merkle_dag.DagLeaf, pubKey *string, signature *string) bool) func(network.Stream)

func BuildUploadStreamHandler

func BuildUploadStreamHandler(store stores.Store, canUploadDag func(rootLeaf *merkle_dag.DagLeaf, pubKey *string, signature *string) bool, handleRecievedDag func(dag *merkle_dag.Dag, pubKey *string)) func(stream network.Stream)

func WaitForDownloadMessage

func WaitForDownloadMessage(stream network.Stream) (bool, *lib.DownloadMessage)

func WaitForResponse

func WaitForResponse(stream network.Stream) bool

func WaitForUploadMessage

func WaitForUploadMessage(stream network.Stream) (bool, *lib.UploadMessage)

func WriteErrorToStream

func WriteErrorToStream(stream network.Stream, message string, err error) error

func WriteResponseToStream

func WriteResponseToStream(stream network.Stream, response bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL