spec

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 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) ApplyScope added in v0.12.0

func (a *Application) ApplyScope(scope *Scope) error

type Build

type Build struct {
	Image  string
	Script []string
}

type Container

type Container struct {
	Dockerfile string
	Image      string
	Entrypoint *string
	WorkingDir *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) ApplyScope added in v0.12.0

func (p *Program) ApplyScope(scope *Scope) 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 Scope added in v0.12.0

type Scope struct {
	Vars map[string]string
}

func (*Scope) Expand added in v0.12.0

func (s *Scope) Expand(text string) (string, error)

func (*Scope) Parse added in v0.12.0

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

func (*Scope) ParseFile added in v0.12.0

func (s *Scope) ParseFile(filename string) error

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) ApplyScope added in v0.12.0

func (s *Spec) ApplyScope(scope *Scope) error

func (*Spec) ApplyScopeFile added in v0.12.0

func (s *Spec) ApplyScopeFile(name string) error

type Unsafe added in v0.4.3

type Unsafe struct {
	NetworkHost bool
}

Jump to

Keyboard shortcuts

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