core

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const StaticLifetime string = "Static"

Constant to ID Static lifetimes

View Source
const TransientLifetime string = "Transient"

Constant to ID Transient lifetimes

Variables

This section is empty.

Functions

This section is empty.

Types

type AcyclicGraph

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

AcyclicGraph represents a directed acyclic AcyclicGraph

func NewGraph

func NewGraph() *AcyclicGraph

NewGraph creates a new graph

func (*AcyclicGraph) AddEdge

func (g *AcyclicGraph) AddEdge(from, to string) error

AddEdge adds a directed edge from one node to another

func (*AcyclicGraph) AddVertex

func (g *AcyclicGraph) AddVertex(value interface{}) (string, error)

AddVertex adds a node to the graph

func (*AcyclicGraph) GetOrder

func (g *AcyclicGraph) GetOrder() int

func (*AcyclicGraph) GetSize

func (g *AcyclicGraph) GetSize() int

func (*AcyclicGraph) GetVertex

func (g *AcyclicGraph) GetVertex(id string) (*node, error)

func (*AcyclicGraph) TraverseBF

func (g *AcyclicGraph) TraverseBF(tAction traverseAction)

Traverse the entire graph breadth-first

func (*AcyclicGraph) TraverseBFFrom

func (g *AcyclicGraph) TraverseBFFrom(start string, tAction traverseAction)

Traverse the graph breadth-first from a specified start node ID

type CircularDependencyError

type CircularDependencyError struct {
	SpecType reflect.Type
	// contains filtered or unexported fields
}

func NewCircularDependencyError

func NewCircularDependencyError(err error, spec reflect.Type) *CircularDependencyError

func (*CircularDependencyError) Error

func (e *CircularDependencyError) Error() string

type ConfigType added in v0.4.0

type ConfigType int
const (
	JsonConfig ConfigType = iota
	YamlConfig
)

type DuplicateEdgeError

type DuplicateEdgeError struct {
	VertexId string
	SpecType reflect.Type
	// contains filtered or unexported fields
}

func NewDuplicateEdgeError

func NewDuplicateEdgeError(err error, id string, spec reflect.Type) *DuplicateEdgeError

func (*DuplicateEdgeError) Error

func (e *DuplicateEdgeError) Error() string

type EdgeCycleError

type EdgeCycleError struct{}

func (*EdgeCycleError) Error

func (e *EdgeCycleError) Error() string

type EdgeExistsError

type EdgeExistsError struct{}

func (*EdgeExistsError) Error

func (e *EdgeExistsError) Error() string

type IDInterface

type IDInterface interface {
	ID() string
}

type InjectorError

type InjectorError struct {
	SpecType reflect.Type
	// contains filtered or unexported fields
}

func NewInjectorError

func NewInjectorError(spec reflect.Type) *InjectorError

func (*InjectorError) Error

func (e *InjectorError) Error() string

type InvalidLifetimeError

type InvalidLifetimeError struct {
	SpecType reflect.Type
	// contains filtered or unexported fields
}

func NewInvalidLifetimeError

func NewInvalidLifetimeError(err error, spec reflect.Type) *InvalidLifetimeError

func (*InvalidLifetimeError) Error

func (e *InvalidLifetimeError) Error() string

type ServiceError

type ServiceError struct {
	SpecType reflect.Type
	ImplType reflect.Type
}

func NewServiceError

func NewServiceError(spec reflect.Type, impl reflect.Type) *ServiceError

func (*ServiceError) Error

func (e *ServiceError) Error() string

type Traverser

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

func (*Traverser) GetVertex

func (t *Traverser) GetVertex() *node

type UnknownError

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

func NewUnknownError

func NewUnknownError(err error) *UnknownError

func (*UnknownError) Error

func (e *UnknownError) Error() string

type VertexExistsError

type VertexExistsError struct{}

func (*VertexExistsError) Error

func (e *VertexExistsError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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