config

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SwarmPort will be used to listen on the swarm
	SwarmPort = "4501"

	DefaultPrivKeyBitSize = 2048
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Addresses

type Addresses struct {
	Swarm []string // addresses for the swarm to listen on
}

Addresses stores the (string) multiaddr addresses for the node.

type Config

type Config struct {
	Identity  Identity  // local node's peer identity
	Addresses Addresses // local node's addresses
	Bootstrap []string
	SwarmPort string
}

Config wraps configuration options for the Peer.

func NewConfig

func NewConfig(swarmPort string) (*Config, error)

NewConfig creates an identity and config for the node

type Identity

type Identity struct {
	PeerID  string
	PrivKey string `json:",omitempty"`
}

Identity tracks the configuration of the local node's identity.

Jump to

Keyboard shortcuts

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