Skip to content

This dependency manager parses passed docker-compose file in YML extension, sorts your services topographically and returns a list of sorted container names or container name by specific index.

Notifications You must be signed in to change notification settings

vch19/dependencies-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dependency Manager

This dependency manager parses passed docker-compose file in YML extension, sorts your services topographically and returns a list of sorted container names or container name by specific index.

Installation

First, use go get to install the latest version of the library. This command will install the dependency-manager with the library and its dependencies:

~$ go get github.com/vch19/dependencies-manager

Example

import (
	manager "github.com/vch19/dependencies-manager"
)

func main() {
	//parse yml file to graph
	dockerCompose := manager.ParseYML("PATH_TO_DOCKER_COMPOSE_FILE")

	//sorts the graph topographically and returns 
	//it as an array with the name of these services
	sortedGraph := manager.Sort(&dockerCompose)
}

About

This dependency manager parses passed docker-compose file in YML extension, sorts your services topographically and returns a list of sorted container names or container name by specific index.

Resources

Stars

Watchers

Forks

Languages