config

package
v0.0.0-...-667c717 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2016 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config describes the configuration required for the ipgs system

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// IPFS is the IPFS Configuration section for the IPGS node.
	IPFS IpfsConfig
	// IPGS is the IPGS Configuration section for the IPGS node.
	IPGS IpgsConfig
}

Config describes the configuration for an IPGS node. It contains various subsections defined by other structs.

func (Config) Save

func (c Config) Save(nodeDir string) error

Save marshals the config into a proper JSON file in th nodeDir provided

type IpfsConfig

type IpfsConfig struct {
	// Path is the IPFS Path. This is usually ~/.ipfs/ . The IPGS node will look
	// inside this directory for the config file to figure out how to connect to
	// the IPFS node's API endpoint. The initializeNode function is actually a
	// bit smarter than all that and asks the local IPGS node for its path.
	Path string
}

IpfsConfig describes the IPFS Configuration section for an IPGS node. It contains the location of the IPFS path and other information required to connect to the IPFS node hosting this IPGS node.

type IpgsConfig

type IpgsConfig struct {
	// UnpinIPNS can be set to true to unpin the previous IPNS object when
	// publishing a new state congiguration
	UnpinIPNS bool
	// APIPort is the port on localhost where the IPGS API will listen for HTTP
	// requests
	APIPort int
}

IpgsConfig describes the IPGS Configuration section for an IPGS node. It contains flags affecting the behavior of the node during normal operation.

Jump to

Keyboard shortcuts

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