drvconfig

package
v0.0.0-...-796e579 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BoardRpi4         = "rpi4"
	BoardNUC7         = "nuc7"
	BoardNUC10        = "nuc10"
	BoardDigitalOcean = "docn"
)

Common boards.

View Source
const (
	DefaultNetwork  = "homedrv"
	DefaultSuffix   = ".homedrv"
	DefaultRegistry = "cr.homedrive.io"
)

Default names

View Source
const (
	LabelName = "io.homedrive.name"
)

Docker labels

View Source
const NoServer = "-"

NoServer to indicate there is no remote server.

Variables

This section is empty.

Functions

func Core

func Core(n *Naming) string

Core returns the name of the core.

func Image

func Image(n *Naming, img string) string

Image returns the image name of an image type.

func Name

func Name(n *Naming, cont string) string

Name returns the name of a container or volume.

func Network

func Network(n *Naming) string

Network returns the network's name.

func NewNameLabel

func NewNameLabel(name string) map[string]string

NewNameLabel returns a name label.

func OldCore

func OldCore(n *Naming) string

OldCore returns the name of the old core.

Types

type Config

type Config struct {
	Name string // Name of the endpoint.

	// Server address, default https://www.homedrive.io
	// "-" means no remote server is being used.
	Server string `json:",omitempty"`

	// Subscribe to which release channel.
	Channel string `json:",omitempty"`

	// Naming conventions. When this is null, using legacy naming.
	Naming *Naming `json:",omitempty"`

	// Identity PEM key file.
	IdentityPem string `json:",omitempty"`

	// Path to docker unix domain socket.
	DockerSock string `json:",omitempty"`

	// Path to system docker unix domain socket.
	SystemDockerSock string `json:",omitempty"`

	// Not running inside a docker.
	External bool `json:",omitempty"`

	// HTTPPort provides alternative http port for doorway container to
	// listen on. If it is negative, then doorway will not listen on
	// HTTP.
	HTTPPort int `json:",omitempty"`

	// HTTPSPort provides the alternative https port for doorway
	// container to listen on. If it is negative, then doorway will
	// not listen on HTTPS.
	HTTPSPort int `json:",omitempty"`

	// When this is true, do not bind ports when port number is 0 and it is not
	// managing the OS.
	AutoAvoidPortBinding bool `json:",omitempty"`

	// Instead of reading the endpoint init config from the server,
	// read from this file.
	EndpointInitConfigFile string `json:",omitempty"`
}

Config is the configuration of a HomeDrive. These configurations are critical for initializing an endpoint. The configurations here provides information about the drive's operating systems, network and identity, so that the drive can be properly installed and initialized.

type Naming

type Naming struct {
	// Network name. Default: "homedrv"
	Network string `json:",omitempty"`

	// Suffix for container and volume names. Default: ".homedrv"
	Suffix string `json:",omitempty"`

	// Image registry path of downloaded images. Default: "cr.homedrive.io"
	Registry string `json:",omitempty"`
}

Naming defines the naming conventions of a jarvis installation.

type SystemInfo

type SystemInfo struct {
	Board string `json:",omitempty"`
}

SystemInfo contains the high-level information of the board and the base OS image.

Jump to

Keyboard shortcuts

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