graph

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2018 License: Apache-2.0 Imports: 2 Imported by: 51

Documentation

Overview

TrafficMap is a map of ServiceNodes, each optionally holding Edge data. Metadata is a general purpose map for holding any desired service or edge information. Each Service node should have a unique name+version

Index

Constants

View Source
const (
	UnknownNamespace = "unknown"
	UnknownService   = "unknown"
	UnknownVersion   = "unknown"
)

Variables

This section is empty.

Functions

func Id

func Id(name, version string) string

Types

type Edge

type Edge struct {
	Source   *ServiceNode
	Dest     *ServiceNode
	Metadata map[string]interface{} // app-specific data
}

func NewEdge

func NewEdge(source, dest *ServiceNode) Edge

type ServiceNode

type ServiceNode struct {
	ID          string                 // unique identifier for the service node
	Name        string                 // full service name
	Version     string                 // service version
	ServiceName string                 // short service name
	Namespace   string                 // namespace name
	Edges       []*Edge                // children services nodes
	Metadata    map[string]interface{} // app-specific data
}

func NewServiceNode

func NewServiceNode(name, version string) ServiceNode

func NewServiceNodeWithId

func NewServiceNodeWithId(id, name, version string) ServiceNode

func (*ServiceNode) AddEdge

func (s *ServiceNode) AddEdge(dest *ServiceNode) *Edge

type TrafficMap

type TrafficMap map[string]*ServiceNode

func NewTrafficMap

func NewTrafficMap() TrafficMap

Directories

Path Synopsis
Cytoscape package provides conversion from our graph to the CystoscapeJS configuration json model.
Cytoscape package provides conversion from our graph to the CystoscapeJS configuration json model.
Package options holds the currently supported path variables and query params for the graph handlers.
Package options holds the currently supported path variables and query params for the graph handlers.
THIS CODE IS PROVIDED AS-IS and the resulting config JSON is targeted for standalone Vizceral use.
THIS CODE IS PROVIDED AS-IS and the resulting config JSON is targeted for standalone Vizceral use.

Jump to

Keyboard shortcuts

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