hub

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HubModeAll = "all" // special all case (for local reading)

	AllModeHelpText = `` /* 217-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CheckValidMode

func CheckValidMode(mode string, local bool) (hubpb.HostsReq_Mode, string, error)

CheckValidMode takes in a raw mode string and returns the host request mode type if valid, and if local is true and mode is empty, return prefix for storing such information into local datastore.

func GetHostSettings

func GetHostSettings(ctx context.Context, addr, peerId string) (*nodepb.Node_Settings, error)

func QueryHosts

func QueryHosts(ctx context.Context, node *core.IpfsNode, mode string) ([]*hubpb.Host, error)

QueryHosts queries the BTFS-Hub to retrieve the latest list of hosts info according to a certain mode.

func QueryStats

func QueryStats(ctx context.Context, node *core.IpfsNode) (*hubpb.StatsResp, error)

QueryStats queries the BTFS-Hub to retrieve the latest storage stats on this host.

Types

This section is empty.

Jump to

Keyboard shortcuts

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