ignite

package
v0.0.0-...-fb6b401 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ignite deals with Ignite JSON configs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChecksumURL

func GetChecksumURL(pv ProjectVersion) string

GetChecksumURL returns the URL to fetch the checksums for the project.

Types

type ConfigJSON

type ConfigJSON struct {
	Projects ProjectsJSON `json:"projects"`
	Nodes    NodeConfigs  `json:"nodes"`
}

func ReadConfig

func ReadConfig() (*ConfigJSON, error)

ReadConfig returns the node/project configs, read from disk.

func (ConfigJSON) CreateNodes

func (conf ConfigJSON) CreateNodes() (nodes, error)

CreateNodes returns nodes created from the configs.

type DropinName

type DropinName struct {
	Unit, Dropin string
}

func (DropinName) Load

func (dn DropinName) Load() (*systemdUnit, error)

Load returns the systemd units.

type NodeConfig

type NodeConfig struct {

	// projectVersions is the names of all the projects the node should run
	ProjectVersions []ProjectVersion `json:"projects"`
	// arch is the CPU architecture the node runs, e.g. "x86_64"
	Arch string `json:"arch"`
	// contains filtered or unexported fields
}

NodeConfig is the configuration of a single node

func (NodeConfig) String

func (nc NodeConfig) String() string

type NodeConfigs

type NodeConfigs map[nodeName]NodeConfig

NodeConfigs is the configuration of all nodes

type NodeFile

type NodeFile struct {
	Path        string `json:"path"`
	Name        string `json:"name"`
	ChecksumKey string `json:"checksum_key"`
}

type NodeFiles

type NodeFiles []NodeFile

func (NodeFiles) String

func (nf NodeFiles) String() string

type ProjectConfig

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

type ProjectConfigs

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

type ProjectName

type ProjectName string

type ProjectVersion

type ProjectVersion struct {
	// name is the name of a project the node should run node, e.g. "hkjninfra"
	Name ProjectName `json:"name"`
	// version is the version of the project that should run on the node, e.g. "1.0.1"
	Version Version `json:"version"`
}

type ProjectsJSON

type ProjectsJSON map[ProjectName]projectJSON

func (ProjectsJSON) GetSecrets

func (conf ProjectsJSON) GetSecrets(projectName ProjectName) (Secrets, error)

GetSecrets returns the URLs for any secrets in the project.

type Secret

type Secret NodeFile

func (Secret) GetURL

func (s Secret) GetURL(secretServiceDomain, sshash string, pv ProjectVersion) string

type Secrets

type Secrets []Secret

type Version

type Version string

Jump to

Keyboard shortcuts

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