Documentation
¶
Index ¶
Constants ¶
const ( MB = 1048576 KB = 1024 )
const ( // TelemetryFile Path. TelemetryFile = platform.CNIRuntimePath + "AzureCNITelemetry.json" )
Variables ¶
This section is empty.
Functions ¶
func ReadFileByLines ¶ added in v1.0.0
Read file line by line and return array of lines.
Types ¶
type BridgeInfo ¶
CNI Bridge Details structure.
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 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 Report ¶ added in v1.0.0
type Report 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 (*Report) GetInterfaceDetails ¶ added in v1.0.0
This function creates a report with interface details(ip, mac, name, secondaryca count).
func (*Report) GetOSDetails ¶ added in v1.0.0
func (report *Report) GetOSDetails()
This function creates a report with os details(ostype, version).
func (*Report) GetOrchestratorDetails ¶ added in v1.0.0
func (report *Report) GetOrchestratorDetails()
This function creates a report with orchestrator details(name, version).
func (*Report) GetReportState ¶ added in v1.0.0
This function will check if report is sent atleast once by checking telemetry file.
func (*Report) GetSystemDetails ¶ added in v1.0.0
func (report *Report) GetSystemDetails()
This function creates a report with system details(memory, disk, cpu).
func (*Report) SetReportState ¶ added in v1.0.0
This function will save the state in file if telemetry report sent successfully.
type ReportManager ¶
type ReportManager struct {
HostNetAgentURL string
IpamQueryURL string
ReportType string
Report *Report
}
ReportManager structure.
func (*ReportManager) GetReport ¶ added in v1.0.0
func (reportMgr *ReportManager) GetReport(name string, version string)
GetReport retrieves orchestrator, system, OS and Interface details and create a report structure.
func (*ReportManager) SendReport ¶
func (reportMgr *ReportManager) SendReport() error
This function will send telemetry report to HostNetAgent.