deps

package
v0.0.0-...-e93ebf1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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

func (BaurConf) FindDepTomls

func (d BaurConf) FindDepTomls(dir, env, region string) (tomls []string, err error)

FindDepTomls searches for dependencies config files in the AppSearchDirs of the AppDiscover and returns all of them

type Composition

type Composition struct {
	Services map[string]Service `json:"services"`
}

func CompositionFromJSON

func CompositionFromJSON(filePath string) (*Composition, error)

func CompositionFromSisuDir

func CompositionFromSisuDir(directory, env, region string) (*Composition, error)

func NewComposition

func NewComposition() *Composition

NewComposition creates a Composition

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

func NewService(deployable bool, deps ...string) Service

NewService creates a Service

func (*Service) AddDependency

func (s *Service) AddDependency(name string)

AddDependency declares name to be a dependency of s.

Jump to

Keyboard shortcuts

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