package
0.0.0-20221107231338-b44688ae358d
Repository: https://github.com/intelsdi-x/swan.git
Documentation: pkg.go.dev

# Functions

AssertFileExists makes sure that executable is available in $PATH or panics returning location of executable.
GetMetric returns FilePublisherMetric structure with requested metric's namespace.
GetOneMeasurementFromFile gets one random measurement from file.
IsPodRunning checks if pod is in Running state.
NewKubeClient creates KubeClient object based on given KubernetesConfig structure.
NewSnapteld constructs Snapteld on random high ports.
NewSnapteldOnDefaultPorts constructs Snapteld on chosen ports.
NewSnapteldOnPort constructs Snapteld on chosen ports.
PreparePublisher creates session publisher and publisher output file, returns cleanup function, publisher and file name where publisher data will be stored.
ReadAndTestPublisherData reads publisher output, when data are read, function checks if we have all data, if we have all columns, if yes, then we compare read data against expectedMetrics.
RunAndTestSnaptel checks snapteld on returning cleanup function, plugin loader and string with snapteld address Note: It is facade function that assumes snapteld is running all the time.
WipeTestClusterFromSurfaceOfTheEarth does a lot to make sure that Kubernetes cluster is stopped and there are not artifacts in etcd or /var/lib/kubelet.

# Variables

SwanPath is an absolute path of project.

# Structs

FilePublisherMetric is used for decoding content of file publisher.
KubeClient is a helper struct to communicate with K8s API.
Snapteld represents Snap daemon used in tests.