config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides configuration definitions for Nexus

Index

Constants

View Source
const DefaultIPFSVersion = "v0.4.18"

DefaultIPFSVersion declares the current default version of go-ipfs to use

Variables

This section is empty.

Functions

func GenerateConfig

func GenerateConfig(configPath string, dev bool) error

GenerateConfig writes an empty orchestrator config template to given filepath

Types

type API

type API struct {
	Host string `json:"host"`
	Port string `json:"port"`
	Key  string `json:"key"`
	TLS  `json:"tls"`
}

API declares configuration for the orchestrator daemon's gRPC API

type Delegator

type Delegator struct {
	Host   string `json:"host"`
	Port   string `json:"port"`
	JWTKey string `json:"jwt_key"`
	TLS    `json:"tls"`
}

Delegator declares configuration for the orchestrator proxy

type IPFS

type IPFS struct {
	Version       string `json:"version"`
	DataDirectory string `json:"data_dir"`
	ModePerm      string `json:"perm_mode"`
	Ports         `json:"ports"`
}

IPFS configures settings relevant to IPFS nodes

type IPFSOrchestratorConfig

type IPFSOrchestratorConfig struct {
	// Address is the address through which external clients connect to this host
	Address string `json:"address"`

	// LogPath, if given, will be where logs are written
	LogPath string `json:"log_path"`

	IPFS          `json:"ipfs"`
	API           `json:"api"`
	Delegator     `json:"delegator"`
	tcfg.Database `json:"postgres"`
}

IPFSOrchestratorConfig configures the orchestration daemon

func LoadConfig

func LoadConfig(configPath string) (IPFSOrchestratorConfig, error)

LoadConfig loads a TemporalConfig from given filepath

func New

New creates a new, default configuration

func (*IPFSOrchestratorConfig) SetDefaults

func (c *IPFSOrchestratorConfig) SetDefaults(dev bool)

SetDefaults initializes certain blank values with defaults, with special presets for dev

type Ports

type Ports struct {
	Swarm   []string `json:"swarm"`
	API     []string `json:"api"`
	Gateway []string `json:"gateway"`
}

Ports declares port-range configuration for IPFS nodes. Elements of each array can be of the form "<PORT>" or "<LOWER>-<UPPER>"

type TLS

type TLS struct {
	CertPath string `json:"cert"`
	KeyPath  string `json:"key"`
}

TLS declares HTTPS configuration

Jump to

Keyboard shortcuts

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