meshdata

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PropertyOrganization identifies the organization property.
	PropertyOrganization = "organization"
	// PropertyMetricsPath identifies the metrics path property.
	PropertyMetricsPath = "metrics_path"
	// PropertyAPIVersion identifies the API version property.
	PropertyAPIVersion = "api_version"
)

Variables

This section is empty.

Functions

func GetPropertyValue

func GetPropertyValue(props map[string]string, id string, defValue string) string

GetPropertyValue performs a case-insensitive search for the given property.

Types

type MeshData

type MeshData struct {
	Sites        []*Site
	ServiceTypes []*ServiceType
}

MeshData holds the entire mesh data managed by Mentix.

func New

func New() *MeshData

New returns a new (empty) MeshData object.

func (*MeshData) Clear

func (meshData *MeshData) Clear()

Clear removes all saved data, leaving an empty mesh.

func (*MeshData) Clone

func (meshData *MeshData) Clone() *MeshData

Clone creates an exact copy of the mesh data.

func (*MeshData) Compare

func (meshData *MeshData) Compare(other *MeshData) bool

Compare checks whether the stored data equals the data of another MeshData object.

func (*MeshData) FromJSON

func (meshData *MeshData) FromJSON(data string) error

FromJSON converts JSON data to mesh data.

func (*MeshData) ToJSON

func (meshData *MeshData) ToJSON() (string, error)

ToJSON converts the data to JSON.

type Service

type Service struct {
	*ServiceEndpoint

	Host                string
	AdditionalEndpoints []*ServiceEndpoint
}

Service represents a service managed by Mentix.

type ServiceEndpoint

type ServiceEndpoint struct {
	Type        *ServiceType
	Name        string
	URL         string
	IsMonitored bool
	Properties  map[string]string
}

ServiceEndpoint represents a service endpoint managed by Mentix.

type ServiceType

type ServiceType struct {
	Name        string
	Description string
}

ServiceType represents a service type managed by Mentix.

type Site

type Site struct {
	Name         string
	FullName     string
	Organization string
	Domain       string
	Homepage     string
	Email        string
	Description  string
	Country      string
	CountryCode  string
	Location     string
	Latitude     float32
	Longitude    float32

	Services   []*Service
	Properties map[string]string
}

Site represents a single site managed by Mentix.

Jump to

Keyboard shortcuts

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