services

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: GPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alive added in v0.7.2

func Alive(announcetime time.Duration) []node.Option

func AvailableNodes added in v0.7.2

func AvailableNodes(b *blockchain.Ledger) (active []string)

func ConnectToService

func ConnectToService(ctx context.Context, ledger *blockchain.Ledger, node *node.Node, ll log.StandardLogger, announcetime time.Duration, serviceID string, srcaddr string) error

func ReceiveFile

func ReceiveFile(ctx context.Context, ledger *blockchain.Ledger, n *node.Node, l log.StandardLogger, announcetime time.Duration, fileID string, path string) error

func RegisterService added in v0.7.2

func RegisterService(ll log.StandardLogger, announcetime time.Duration, serviceID, dstaddress string) []node.Option

ExposeService exposes a service to the p2p network. meant to be called before a node is started with Start()

func ShareFile

func ShareFile(ll log.StandardLogger, announcetime time.Duration, fileID, filepath string) ([]node.Option, error)

ShareFile shares a file to the p2p network. meant to be called before a node is started with Start()

Types

This section is empty.

Jump to

Keyboard shortcuts

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