Documentation
¶
Index ¶
- Constants
- func BuildHomePath(env map[string]string, path string) (string, string)
- func LoadConfig(env map[string]string, home string) (*Layout, *Path, error)
- func ParseSize(size string) (int64, error)
- func WriteDefaultConfig(env map[string]string, home string, outpath *Path) error
- type DiskImage
- type DockerSocket
- type Layout
- type LogConfig
- type Path
- func (p *Path) MarshalText() ([]byte, error)
- func (p *Path) ResolveInputDir(env map[string]string, root string) bool
- func (p *Path) ResolveInputFile(env map[string]string, root string) bool
- func (p Path) ResolveListenSocket(env map[string]string, root string) (network string, addr string, err error)
- func (p *Path) ResolveOutputDir(env map[string]string, root string) error
- func (p *Path) ResolveOutputFile(env map[string]string, root string) (bool, error)
- func (p *Path) UnmarshalText(data []byte) error
- type Paths
- type Share
- type UnknownFieldError
- type UnmatchedVariableError
Constants ¶
View Source
const AppID = "com.github.amadigan.railyard"
View Source
const HomeEnv = "RAILYARD_HOME"
View Source
const Name = "railyard"
View Source
const SysHomeDir = "/usr/local/share/railyard"
View Source
const UserHomeDir = "${HOME}/Library/Application Support/railyard"
View Source
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiskImage ¶
type DiskImage struct { Mount string `json:"mount" yaml:"mount"` Size string `json:"size" yaml:"size"` Backup bool `json:"backup" yaml:"backup"` FS string `json:"fs" yaml:"fs"` FormatOptions []string `json:"mkfs" yaml:"mkfs"` ReadOnly bool `json:"ro,omitempty" yaml:"ro,omitempty"` Options []string `json:"opts" yaml:"opts"` Path *Path `json:"path,omitempty" yaml:"path,omitempty"` }
func (*DiskImage) UnmarshalJSON ¶
type DockerSocket ¶
func (DockerSocket) MarshalJSON ¶
func (d DockerSocket) MarshalJSON() ([]byte, error)
func (*DockerSocket) UnmarshalJSON ¶
func (d *DockerSocket) UnmarshalJSON(data []byte) error
type Layout ¶
type Layout struct { Home string `json:"-" yaml:"-"` Ram uint64 `json:"ram,omitempty" yaml:"ram,omitempty"` Cpu uint `json:"cpu,omitempty" yaml:"cpu,omitempty"` Kernel *Path `json:"kernel,omitempty" yaml:"kernel,omitempty"` Root *Path `json:"root,omitempty" yaml:"root,omitempty"` Disks map[string]*DiskImage `json:"disks" yaml:"disks"` DockerSocket DockerSocket `json:"docker-socket" yaml:"docker-socket"` Sockets map[string]string `json:"sockets" yaml:"sockets"` Console bool `json:"-" yaml:"-"` JsonConfigs map[string]any `json:"json-conf" yaml:"json-conf"` HostIface string `json:"host-iface,omitempty" yaml:"host-iface,omitempty"` Sysctl map[string]string `json:"sysctl" yaml:"sysctl"` StateFile *Path `json:"state-file,omitempty" yaml:"state-file,omitempty"` Log LogConfig `json:"logs" yaml:"logs"` DockerConfig map[string]any `json:"dockerd" yaml:"dockerd"` MetricInterval uint16 `json:"metric-interval,omitempty" yaml:"metric-interval,omitempty"` Rosetta *bool `json:"rosetta,omitempty" yaml:"rosetta,omitempty"` IdleTimeout time.Duration `json:"idle-timeout,omitempty" yaml:"idle-timeout,omitempty"` }
func (*Layout) SetDefaultSockets ¶
func (l *Layout) SetDefaultSockets()
func (*Layout) SetDefaults ¶
func (l *Layout) SetDefaults()
func (*Layout) UnmarshalJSON ¶
type LogConfig ¶
type LogConfig struct { Level string `json:"level,omitempty"` Directory *Path `json:"dir,omitempty"` Streams map[string]string `json:"streams,omitempty"` }
func (LogConfig) MarshalJSON ¶
func (*LogConfig) UnmarshalJSON ¶
type Path ¶
func (*Path) MarshalText ¶
func (*Path) ResolveInputDir ¶
func (*Path) ResolveInputFile ¶
func (Path) ResolveListenSocket ¶
func (*Path) ResolveOutputDir ¶
func (*Path) ResolveOutputFile ¶
func (*Path) UnmarshalText ¶
type UnknownFieldError ¶
func (*UnknownFieldError) Error ¶
func (e *UnknownFieldError) Error() string
type UnmatchedVariableError ¶
type UnmatchedVariableError struct {
Variables []string
}
func (*UnmatchedVariableError) Error ¶
func (e *UnmatchedVariableError) Error() string
Click to show internal directories.
Click to hide internal directories.