swmintegration

package
v0.0.0-...-ae4b091 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractMetric

func ExtractMetric(metricId string, metricValue float64)

func RunExporter

func RunExporter(duration time.Duration, namespace string)

Types

type Metric

type Metric struct {
	SourceNode string
	TargetNode string
	// contains filtered or unexported fields
}

type NetworkTopology

type NetworkTopology struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              NetworkTopologySpec `json:"spec,omitempty"`
}

func GenerateTopologyFromMetrics

func GenerateTopologyFromMetrics(metricArray []collector.MetricData) (NetworkTopology, error)

func HardcodeTopology

func HardcodeTopology() NetworkTopology

func (NetworkTopology) GetUnstructuredData

func (networkTopology NetworkTopology) GetUnstructuredData() *unstructured.Unstructured

type NetworkTopologyList

type NetworkTopologyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NetworkTopology `json:"items"`
}

type NetworkTopologySpec

type NetworkTopologySpec struct {
	NetworkImplementation string `json:"networkImplementation"`

	PhysicalBase string `json:"physicalBase"`

	Nodes []TopologyNodeSpec `json:"nodes,omitempty"`

	Links []TopologyLinkSpec `json:"links,omitempty"`
}

type NodeType

type NodeType string
const (
	COMPUTE_NODE NodeType = "COMPUTE"
	NETWORK_NODE NodeType = "NETWORK"
)

type SWMClient

type SWMClient struct {
	SchemaGVR     schema.GroupVersionResource
	DynamicClient *dynamic.DynamicClient
}

Uses ExporterClient interface

func (*SWMClient) ExportCRD

func (swmClient *SWMClient) ExportCRD(namespace string, networkTopology exporterclient.StructCustomResourceDefinition)

func (*SWMClient) GetDynamicClient

func (swmClient *SWMClient) GetDynamicClient() dynamic.DynamicClient

func (*SWMClient) GetSchemaGVR

func (swmClient *SWMClient) GetSchemaGVR() schema.GroupVersionResource

func (*SWMClient) NewClient

func (swmClient *SWMClient) NewClient() error

type TopologyLinkCapabilities

type TopologyLinkCapabilities struct {
	BandWidthBits string `json:"bandWidthBits,omitempty"`

	LatencyNanos string `json:"latencyNanos,omitempty"`

	OtherCapabilities map[string]string `json:"otherCapabilities"`
}

type TopologyLinkSpec

type TopologyLinkSpec struct {
	Name   string `json:"name"`
	Source string `json:"source"`

	Target       string                   `json:"target"`
	Capabilities TopologyLinkCapabilities `json:"capabilities"`
}

type TopologyNodeSpec

type TopologyNodeSpec struct {
	Name string `json:"name,omitempty"`

	Type NodeType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=NodeType"`
}

type TopologyPathSpec

type TopologyPathSpec struct {
	Nodes []string `json:"nodes"`
}

Jump to

Keyboard shortcuts

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