stacks

package
v0.0.0-...-d049006 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StacksDir = path.Join(homeDir, ".firefly", "stacks")

Functions

func CheckExists

func CheckExists(stackName string) bool

func InitStack

func InitStack(stackName string, memberCount int)

func NewFireflyConfigs

func NewFireflyConfigs(stack *Stack) map[string]*FireflyConfig

func WriteSwarmKey

func WriteSwarmKey(path string)

Types

type BasicAuth

type BasicAuth struct {
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
}

type BlockchainConfig

type BlockchainConfig struct {
	Type       string            `yaml:"type,omitempty"`
	Ethconnect *EthconnectConfig `yaml:"ethconnect,omitempty"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Type        string `yaml:"type,omitempty"`
	URL         string `yaml:"url,omitempty"`
	AutoMigrate bool   `yaml:"autoMigrate,omitempty"`
}

type DependsOn

type DependsOn map[string]map[string]string

type DockerCompose

type DockerCompose struct {
	Version  string              `yaml:"version,omitempty"`
	Services map[string]*Service `yaml:"services,omitempty"`
}

func CreateDockerCompose

func CreateDockerCompose(stack *Stack) *DockerCompose

type EthconnectConfig

type EthconnectConfig struct {
	URL                 string     `yaml:"url,omitempty"`
	Instance            string     `yaml:"instance,omitempty"`
	Topic               string     `yaml:"topic,omitempty"`
	SkipEventStreamInit bool       `yaml:"skipEventstreamInit,omitempty"`
	Auth                *BasicAuth `yaml:"auth,omitempty"`
}

type FireflyConfig

type FireflyConfig struct {
	Log        *LogConfig        `yaml:"log,omitempty"`
	Debug      *HttpConfig       `yaml:"debug,omitempty"`
	HTTP       *HttpConfig       `yaml:"http,omitempty"`
	Node       *NodeConfig       `yaml:"node,omitempty"`
	Blockchain *BlockchainConfig `yaml:"blockchain,omitempty"`
	Database   *DatabaseConfig   `yaml:"database,omitempty"`
	P2PFS      *P2PFSConfig      `yaml:"p2pfs,omitempty"`
}

type HealthCheck

type HealthCheck struct {
	Test     []string `yaml:"test,omitempty"`
	Interval string   `yaml:"interval,omitempty"`
	Timeout  string   `yaml:"timeout,omitempty"`
	Retries  int      `yaml:"retries,omitempty"`
}

type HttpConfig

type HttpConfig struct {
	Port    int    `yaml:"port,omitempty"`
	Address string `yaml:"address,omitempty"`
}

type LogConfig

type LogConfig struct {
	Level string `yaml:"level,omitempty"`
}

type LoggingConfig

type LoggingConfig struct {
	Driver  string            `yaml:"driver,omitempty"`
	Options map[string]string `yaml:"options,omitempty"`
}

type NodeConfig

type NodeConfig struct {
	Identity string `yaml:"identity,omitempty"`
}

type P2PFSConfig

type P2PFSConfig struct {
	Type string `yaml:"type,omitempty"`
	URL  string `yaml:"url,omitempty"`
}

type Service

type Service struct {
	Image       string                       `yaml:"image,omitempty"`
	Command     string                       `yaml:"command,omitempty"`
	Environment map[string]string            `yaml:"environment,omitempty"`
	Volumes     []string                     `yaml:"volumes,omitempty"`
	Ports       []string                     `yaml:"ports,omitempty"`
	DependsOn   map[string]map[string]string `yaml:"depends_on,omitempty"`
	HealthCheck *HealthCheck                 `yaml:"healthcheck,omitempty"`
	Logging     *LoggingConfig               `yaml:"logging,omitempty"`
}

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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