Documentation ¶
Index ¶
- func OutputDotGraph(comp Composition, includeUndeployable bool) (s string, err error)
- type AppDiscover
- type BaurConf
- type Composition
- func (comp *Composition) AddService(name string, service Service)
- func (comp Composition) DeploymentOrder(includeUndeployable bool) (order []string, err error)
- func (comp Composition) Deps(s string) (services []string)
- func (comp Composition) RecursiveDepsOf(s string) (newcomp *Composition, err error)
- func (comp *Composition) ToJSONFile(path string) error
- func (comp *Composition) VerifyDependencies() (err error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OutputDotGraph ¶
func OutputDotGraph(comp Composition, includeUndeployable bool) (s string, err error)
Types ¶
type AppDiscover ¶
type AppDiscover struct { AppDirs []string `toml:"application_dirs"` SearchDepth int `toml:"search_depth"` }
AppDiscover is a section of baur.toml
type BaurConf ¶
type BaurConf struct {
Discover AppDiscover
}
BaurConf represents the baur.conf and needed options
type Composition ¶
func CompositionFromJSON ¶
func CompositionFromJSON(filePath string) (*Composition, error)
func CompositionFromSisuDir ¶
func CompositionFromSisuDir(directory, env, region string) (*Composition, error)
func (*Composition) AddService ¶
func (comp *Composition) AddService(name string, service Service)
AddService adds a Service with the given name to the Composition.
func (Composition) DeploymentOrder ¶
func (comp Composition) DeploymentOrder(includeUndeployable bool) (order []string, err error)
DeploymentOrder ... deploy from order[0] to order[len(order) -1] :)
func (Composition) Deps ¶
func (comp Composition) Deps(s string) (services []string)
Deps returns list of dependent services
func (Composition) RecursiveDepsOf ¶
func (comp Composition) RecursiveDepsOf(s string) (newcomp *Composition, err error)
RecursiveDepsOf returns Composition with services and dependencies of given servicename servicename can be a comma separated list of servicenames
func (*Composition) ToJSONFile ¶
func (comp *Composition) ToJSONFile(path string) error
func (*Composition) VerifyDependencies ¶
func (comp *Composition) VerifyDependencies() (err error)
VerifyDependencies checks if all given dependencies are valid it takes a comma separated list of service names. These dependencies should be ignored which can be handy when you have external managed ones.
type Service ¶
type Service struct { DependsOn map[string]struct{} `json:"depends_on"` Deployable bool `json:"deployable"` }
func NewService ¶
NewService creates a Service
func (*Service) AddDependency ¶
AddDependency declares name to be a dependency of s.