depends

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package depends provides dependency resolver for factory

Index

Constants

This section is empty.

Variables

View Source
var ErrCircularDependency = errors.New("circular dependency found")

ErrCircularDependency report that circular dependency found

Functions

func Resolve

func Resolve(data []*factory.MetaData) (result []*factory.MetaData, err error)

Resolve resolve dependencies

Types

type Graph

type Graph []*Node

Graph is the collection of node

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node represents a single node in the graph with it's dependencies

func NewNode

func NewNode(index int, data interface{}, deps ...*Node) *Node

NewNode creates a new node

Directories

Path Synopsis
Package bar is the test package for package depends
Package bar is the test package for package depends
Package fake is the test package for package depends
Package fake is the test package for package depends
Package foo is the test package for package depends
Package foo is the test package for package depends

Jump to

Keyboard shortcuts

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