Nexus: github.com/RTradeLtd/Nexus/config Index | Files

package config

import "github.com/RTradeLtd/Nexus/config"

Package config provides configuration definitions for Nexus

Index

Package Files

config.go doc.go generate.go

Constants

const DefaultIPFSVersion = "v0.4.20"

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

func GenerateConfig Uses

func GenerateConfig(configPath string, dev bool) error

GenerateConfig writes an empty orchestrator config template to given filepath

type API Uses

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 Uses

type Delegator struct {
    Domain string `json:"domain:"`
    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 Uses

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 Uses

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 Uses

func LoadConfig(configPath string) (IPFSOrchestratorConfig, error)

LoadConfig loads a TemporalConfig from given filepath

func New Uses

func New() IPFSOrchestratorConfig

New creates a new, default configuration

func (*IPFSOrchestratorConfig) SetDefaults Uses

func (c *IPFSOrchestratorConfig) SetDefaults(dev bool)

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

type Ports Uses

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 Uses

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

TLS declares HTTPS configuration

Package config imports 6 packages (graph) and is imported by 13 packages. Updated 2019-06-02. Refresh now. Tools for package owners.