Documentation ¶
Index ¶
- Constants
- type Context
- type Project
- type Service
- func (s *Service) GetComposeFileContent() ([]byte, error)
- func (s *Service) GetComposeProject() (*prj.Project, error)
- func (s *Service) LoadComposeFile() (*prj.Project, error)
- func (s *Service) Start(opt *options.Start) error
- func (s *Service) Status(opt *opts.Status) (string, error)
- func (s *Service) Stop(opt *options.Stop) error
- type Tag
- type YamlProject
- type YamlService
Constants ¶
View Source
const ( //DeplyomentModeCompose compose deployment mode DeplyomentModeCompose = "compose" //DeplyomentModeSwarm swarm deployment mode DeplyomentModeSwarm = "swarm" //DeplyomentModeFunction function deployment mode DeplyomentModeFunction = "function" //DeplyomentModeContainer single container deployment mode DeplyomentModeContainer = "container" )
View Source
const VERSION = "1"
VERSION default project version
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Project ¶
type Project struct { Name string Version string Services map[string]*Service // contains filtered or unexported fields }
Project definition
func NewProjectFromFile ¶
NewProjectFromFile initialize a new project from a configuration file
type Service ¶
type Service struct { Context *Context Name string Tags map[string]Tag File string FileContent []byte Mode string // contains filtered or unexported fields }
Service definition
func (*Service) GetComposeFileContent ¶
GetComposeFileContent read the compose yml file
func (*Service) GetComposeProject ¶
GetComposeProject return a project instance, loading if needed
func (*Service) LoadComposeFile ¶
LoadComposeFile read a compose yml file project
type YamlProject ¶
type YamlProject struct { Name string `yaml:"name"` Version string `yaml:"version"` Services map[string]YamlService `yaml:"services"` }
YamlProject yaml model
Click to show internal directories.
Click to hide internal directories.