graph

package
v0.0.0-...-f8ab10a Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	Nodes []*Node
	Edges map[*Node][]*Node
}

Graph holds all service definitions from a docker-compose file

func New

func New() *Graph

New returns a new Graph

func (*Graph) Insert

func (g *Graph) Insert(in *Node) bool

Insert adds a new node to the graph

func (*Graph) InsertEdge

func (g *Graph) InsertEdge(u, v *Node) bool

InsertEdge inserts a new edge in the graph

type Node

type Node struct {
	Name string
}

Node represents a service as a node in a graph

func (*Node) Normalize

func (n *Node) Normalize() string

Normalize normalizes node name

Jump to

Keyboard shortcuts

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