config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultNodeConf = "config.json"
View Source
const DefaultRepoPath = "~/.filejoy"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Identity      Identity `json:"identity"`
	ListenAddrs   []string `json:"listen_addrs"`
	AnnounceAddrs []string `json:"announce_addrs"`
	Bootstrappers []string `json:"bootstrappers"`

	Datastore      string  `json:"datastore"`
	Blockstore     string  `json:"blockstore"`
	DSClusterConf  string  `json:"ds_cluster_conf"`
	RemoteDSConf   string  `json:"remote_ds_conf"`
	RPC            JSONRPC `json:"rpc"`
	Relay          bool    `json:"relay"`
	EnableRemoteDS bool    `json:"enable_remote_ds"`
	GateWayPort    uint    `json:"gateway_port"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

func LoadOrInitConfig

func LoadOrInitConfig(path string) (*Config, error)

type Identity

type Identity struct {
	PeerID string `json:"peer_id"`
	SK     []byte `json:"sk"`
}

type JSONRPC

type JSONRPC struct {
	Host string `json:"host"`
	Port string `json:"port"`
	Root string `json:"root"`
}

Jump to

Keyboard shortcuts

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