spec

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name       string
	Identifier string
	Deploy     Deploy

	Programs    map[string]Program
	ProgramKeys []string

	Cron Cron
}

func (*Application) ExpandVars added in v0.14.1

func (a *Application) ExpandVars(vars Vars) error

type Build

type Build struct {
	Image  string
	Script []string
}

type Container

type Container struct {
	Dockerfile     string
	Image          string
	Entrypoint     *string
	WorkingDir     *string
	ApplicationDir *string
}

type Cron

type Cron struct {
	Jobs []Job
}

func (Cron) Job

func (c Cron) Job(k string) Job

type Deploy

type Deploy struct {
	Current string
}

type Error

type Error struct {
	Name string
	Err  error
}

func (*Error) Error

func (e *Error) Error() string

type Job

type Job struct {
	Key         string
	Command     string
	Schedule    string
	Jitter      string
	Healthcheck JobHealthcheck
}

type JobHealthcheck added in v0.4.0

type JobHealthcheck struct {
	URL string
}

type Package

type Package struct {
	Contents []string
}

type Program

type Program struct {
	Key         string `yaml:"-"`
	Name        string
	Command     string
	User        string
	Container   Container
	Ports       []string
	Volumes     []string
	Healthcheck *ProgramHealthcheck
	Scales      []Scale
	Reload      Reload

	Unsafe Unsafe
}

func (*Program) ExpandVars added in v0.14.1

func (p *Program) ExpandVars(vars Vars) error

type ProgramHealthcheck added in v0.4.0

type ProgramHealthcheck struct {
	Command     string
	Interval    time.Duration
	Timeout     time.Duration
	Retries     int
	StartPeriod time.Duration
}

type Reload added in v0.12.0

type Reload struct {
	Method     string
	Signal     string
	Command    string
	PreCommand string
}

type Scale added in v0.10.0

type Scale struct {
	If string
	N  string
}

type Spec

type Spec struct {
	Application Application
}

func Parse

func Parse(filename string, b []byte) (*Spec, error)

func ParseFile

func ParseFile(filename string) (*Spec, error)

func (*Spec) ExpandVars added in v0.14.1

func (s *Spec) ExpandVars(vars Vars) error

type Unsafe added in v0.4.3

type Unsafe struct {
	NetworkHost bool
}

type Vars added in v0.14.1

type Vars map[string]any

func (Vars) Expand added in v0.14.1

func (v Vars) Expand(text string) (string, error)

Jump to

Keyboard shortcuts

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