peerflags

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Flags = []cli.Flag{
	{
		Name:        "fake-mode",
		DefValue:    false,
		Description: "Avoid owner wallet-address verification. Use only for test purposes.",
	},
	{
		Name:        "private-key",
		DefValue:    "",
		Description: "Libp2p private key",
	},
	{
		Name: "listen-multiaddr",
		DefValue: []string{
			"/ip4/0.0.0.0/tcp/4001",
			"/ip4/0.0.0.0/udp/4001/quic",
		},
		Description: "Libp2p listen multiaddr",
	},
	{
		Name: "bootstrap-multiaddr",
		DefValue: []string{

			"/ip4/34.83.3.108/tcp/4001/p2p/12D3KooWGDBaVz45c5d9VEtF4eM7Pgj71DSzB3HHAfpjc8fb5EGe",
			"/ip4/34.83.3.108/udp/4001/quic/p2p/12D3KooWGDBaVz45c5d9VEtF4eM7Pgj71DSzB3HHAfpjc8fb5EGe",

			"/ip4/34.105.101.67/tcp/4001/p2p/12D3KooW9wsxrkCx6CnsWb1gBxZWAjzVK5Hif9FLXKoQZYLewXoD",
			"/ip4/34.105.101.67/udp/4001/quic/p2p/12D3KooW9wsxrkCx6CnsWb1gBxZWAjzVK5Hif9FLXKoQZYLewXoD",

			"/ip4/34.83.36.118/tcp/4001/p2p/12D3KooWQSf4SMyWPSqLN23KxhcLWYhshWb34pYv65cr85jGpNrR",

			"/ip4/34.82.221.249/tcp/4001/p2p/12D3KooWBGyJbDmjjvEzfsgb3nE9JsfcYRqPxpnQagxbb1PyxBrb",

			"/ip4/34.83.88.62/tcp/4001/p2p/12D3KooWHpxr8BTd3R6kAqvtfn77PKW7WRqJ4cbnrT59K2rU44WM",
		},
		Description: "Libp2p bootstrap peer multiaddr",
	},
	{
		Name:        "announce-multiaddr",
		DefValue:    []string{},
		Description: "Libp2p annouce multiaddr",
	},
	{
		Name:        "conn-low",
		DefValue:    256,
		Description: "Libp2p connection manager low water mark",
	},
	{
		Name:        "conn-high",
		DefValue:    512,
		Description: "Libp2p connection manager high water mark",
	},
	{
		Name:        "conn-grace",
		DefValue:    time.Second * 120,
		Description: "Libp2p connection manager grace period",
	},
	{
		Name:        "quic",
		DefValue:    false,
		Description: "Enable the QUIC transport",
	},
	{
		Name:        "nat",
		DefValue:    false,
		Description: "Enable NAT port mapping",
	},
	{
		Name:        "mdns",
		DefValue:    false,
		Description: "Enable MDNS peer discovery",
	},
}

Flags defines daemon flags for github.com/textileio/go-libp2p-pubsub-rpc/peer.

Functions

func GetConfig

func GetConfig(v *viper.Viper, repoPathEnv, defaultRepoPath string, isAuctioneer bool) (peer.Config, error)

GetConfig returns a Config from a *viper.Viper instance.

func WriteConfig

func WriteConfig(v *viper.Viper, repoPathEnv, defaultRepoPath string) (string, error)

WriteConfig writes a *viper.Viper config to file. The file is written to a path in pathEnv env var if set, otherwise to defaultPath.

Types

This section is empty.

Jump to

Keyboard shortcuts

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