topology

package
v0.0.0-...-c4caace Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	ExternalID       string `json:"externalId"`
	Type             Type   `json:"type"`
	Data             Data   `json:"data"`
	SourceProperties Data   `json:"sourceProperties"`
}

Component is a representation of a topology component

func (Component) JSONString

func (c Component) JSONString() string

JSONString returns a JSON string of the Component

type Data

type Data map[string]interface{}

Data type is used as an alias for the golang map

func (Data) PutNonEmpty

func (d Data) PutNonEmpty(key string, value interface{}) bool

PutNonEmpty adds the value for the given key to the map if the value is not nil

type Instance

type Instance struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

Instance is a representation of a topology source instance

func (*Instance) GoString

func (i *Instance) GoString() string

GoString prints as string

type Relation

type Relation struct {
	ExternalID string `json:"externalId"`
	SourceID   string `json:"sourceId"`
	TargetID   string `json:"targetId"`
	Type       Type   `json:"type"`
	Data       Data   `json:"data"`
}

Relation is a representation of a topology relation

func (Relation) JSONString

func (r Relation) JSONString() string

JSONString returns a JSON string of the Relation

type Topology

type Topology struct {
	StartSnapshot bool        `json:"start_snapshot"`
	StopSnapshot  bool        `json:"stop_snapshot"`
	Instance      Instance    `json:"instance"`
	Components    []Component `json:"components"`
	Relations     []Relation  `json:"relations"`
	DeleteIDs     []string    `json:"delete_ids"`
}

Topology is a batch of instance topology

type Type

type Type struct {
	Name string `json:"name"`
}

Type of topology element (component or relation)

Jump to

Keyboard shortcuts

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