Documentation ¶
Index ¶
Constants ¶
const ( // TelemetryFile Path. CNITelemetryFile = platform.CNIRuntimePath + "AzureCNITelemetry.json" NPMTelemetryFile = platform.NPMRuntimePath + "AzureNPMTelemetry.json" )
const ( MB = 1048576 KB = 1024 )
Variables ¶
This section is empty.
Functions ¶
func ReadFileByLines ¶ added in v1.0.0
ReadFileByLines reads file line by line and return array of lines.
Types ¶
type BridgeInfo ¶
CNI Bridge Details structure.
type CNIReport ¶
type CNIReport struct { StartFlag bool CniSucceeded bool Name string Version string ErrorMessage string Context string SubContext string VnetAddressSpace []string OrchestratorDetails *OrchestratorInfo OSDetails *OSInfo SystemDetails *SystemInfo InterfaceDetails *InterfaceInfo BridgeDetails *BridgeInfo }
Azure CNI Telemetry Report structure.
func (*CNIReport) GetInterfaceDetails ¶ added in v1.0.9
GetInterfaceDetails creates a report with interface details(ip, mac, name, secondaryca count).
func (*CNIReport) GetOSDetails ¶
func (report *CNIReport) GetOSDetails()
This function creates a report with os details(ostype, version).
func (*CNIReport) GetOrchestratorDetails ¶ added in v1.0.9
func (report *CNIReport) GetOrchestratorDetails()
GetOrchestratorDetails creates a report with orchestrator details(name, version).
func (*CNIReport) GetReportState ¶ added in v1.0.9
GetReportState will check if CNI report is sent at least once by checking telemetry file.
func (*CNIReport) GetSystemDetails ¶
func (report *CNIReport) GetSystemDetails()
This function creates a report with system details(memory, disk, cpu).
func (*CNIReport) SetReportState ¶ added in v1.0.9
SetReportState will save the state in file if CNI telemetry report sent successfully.
type CNIReportManager ¶ added in v1.0.9
type CNIReportManager struct { *ReportManager IpamQueryURL string Report *CNIReport }
CNIReportManager structure.
func (*CNIReportManager) GetReport ¶ added in v1.0.9
func (reportMgr *CNIReportManager) GetReport(name string, version string)
GetReport retrieves orchestrator, system, OS and Interface details and create a report structure.
func (*CNIReportManager) SendReport ¶ added in v1.0.9
func (reportMgr *CNIReportManager) SendReport() error
SendReport will send CNI telemetry report to HostNetAgent.
type ClusterState ¶ added in v1.0.9
ClusterState contains the current kubernetes cluster state.
type InterfaceInfo ¶
type InterfaceInfo struct { InterfaceType string Subnet string PrimaryCA string MAC string Name string SecondaryCATotalCount int SecondaryCAUsedCount int ErrorMessage string }
Interface Details structure.
type NPMReport ¶ added in v1.0.9
type NPMReport struct { StartFlag bool ClusterID string NodeName string InstanceName string NpmVersion string KubernetesVersion string ErrorMessage string EventMessage string UpTime string ClusterState ClusterState }
NPMReport structure.
func (*NPMReport) GetReportState ¶ added in v1.0.9
GetReportState will check if NPM report is sent at least once by checking telemetry file.
func (*NPMReport) SetReportState ¶ added in v1.0.9
SetReportState will save the state in file if NPM telemetry report sent successfully.
type NPMReportManager ¶ added in v1.0.9
type NPMReportManager struct { *ReportManager Report *NPMReport }
NPMReportManager structure.
func (*NPMReportManager) GetReport ¶ added in v1.0.9
func (reportMgr *NPMReportManager) GetReport(clusterID, nodeName, npmVersion, kubernetesVersion string, clusterState ClusterState)
GetReport retrives npm and kubernetes cluster related info and create a report structure.
func (*NPMReportManager) SendReport ¶ added in v1.0.9
func (reportMgr *NPMReportManager) SendReport() error
SendReport will send NPM telemetry report to HostNetAgent.
type OSInfo ¶
type OSInfo struct { OSType string OSVersion string KernelVersion string OSDistribution string ErrorMessage string }
OS Details structure.
type OrchestratorInfo ¶ added in v1.0.1
type OrchestratorInfo struct { OrchestratorName string OrchestratorVersion string ErrorMessage string }
Orchestrator Details structure.
type ReportManager ¶
ReportManager structure.