Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMissingService = errors.New("missing service")
)
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks struct { // Prestart is a list of commands to run before the service starts. Prestart []string `yaml:"prestart" json:"prestart"` // Poststart is a list of commands to run after the service starts. Poststart []string `yaml:"poststart" json:"poststart"` // Preclean is a list of commands to run before the service is removed by the container collector. Preclean []string `yaml:"preclean" json:"preclean"` // Postclean is a list of commands to run after the service is removed by the container collector. Postclean []string `yaml:"postclean" json:"postclean"` }
func (*Hooks) MarshalJSON ¶
type Service ¶
type Service struct { // Name of the service. Name string `yaml:"-" json:"-"` // Include is the path to a file containing the service config. Include string `yaml:"include" json:"include"` // Image name without a registry. Image string `yaml:"image" json:"image"` // Hosts the service responds to. Hosts []string `yaml:"hosts" json:"hosts"` // Env variables for the service. Env EnvMap `yaml:"env" json:"env"` // ListeningOn is the port the service listens on. ListeningOn string `yaml:"listening_on" json:"listeningOn"` // Hooks are commands to run during the lifecycle of the service. Hooks Hooks `yaml:"hooks" json:"hooks"` // Requires is a list of services that must be running before this service. Requires []string `yaml:"requires" json:"requires"` // Registry to pull the image from. // It may be a string referencing Retrieve.Registries[%s] or a Registry. Registry string `yaml:"registry" json:"registry"` }
Service contains the information about a service.
func (*Service) ApplyDefaults ¶
ApplyDefaults sets default values and transforms certain defined patterns of a unmarshalled service.
func (*Service) MarshalJSON ¶
type ServiceMap ¶
func (ServiceMap) GroupInLayers ¶
func (s ServiceMap) GroupInLayers() ([][]*Service, error)
func (ServiceMap) NewGraph ¶
func (s ServiceMap) NewGraph() (*Node, error)
func (*ServiceMap) UnmarshalYAML ¶
func (s *ServiceMap) UnmarshalYAML(unmarshal func(any) error) error
Click to show internal directories.
Click to hide internal directories.