Documentation
¶
Overview ¶
Copyright Microsoft. All rights reserved.
Index ¶
Constants ¶
View Source
const (
// EnvCNSConfig is the CNS_CONFIGURATION_PATH env var key
EnvCNSConfig = "CNS_CONFIGURATION_PATH"
)
View Source
const (
// EnvNodeName is the NODENAME env var string key.
EnvNodeName = "NODENAME"
)
Variables ¶
View Source
var ErrNodeNameUnset = errors.Errorf("must declare %s environment variable", EnvNodeName)
ErrNodeNameUnset indicates the the $EnvNodeName variable is unset in the environment.
Functions ¶
func NodeName ¶
NodeName checks the environment variables for the NODENAME and returns it or an error if unset.
func SetCNSConfigDefaults ¶
func SetCNSConfigDefaults(config *CNSConfig)
SetCNSConfigDefaults set default values of CNS config if not specified
Types ¶
type CNSConfig ¶
type CNSConfig struct {
ChannelMode string
InitializeFromCNI bool
ManagedSettings ManagedSettings
Debug bool
SyncHostNCTimeoutMs int
SyncHostNCVersionIntervalMs int
TLSCertificatePath string
TLSEndpoint string
TLSPort string
TLSSubjectName string
TelemetrySettings TelemetrySettings
UseHTTPS bool
WireserverIP string
}
func ReadConfig ¶
ReadConfig returns a CNS config from file or an error.
type ManagedSettings ¶
type TelemetrySettings ¶
type TelemetrySettings struct {
// Flag to disable the telemetry.
DisableAll bool
// Flag to Disable sending trace.
DisableTrace bool
// Flag to Disable sending metric.
DisableMetric bool
// Flag to Disable sending events.
DisableEvent bool
// Configure how many bytes can be sent in one call to the data collector
TelemetryBatchSizeBytes int
// Configure the maximum delay before sending queued telemetry in milliseconds
TelemetryBatchIntervalInSecs int
// Heartbeat interval for sending heartbeat metric
HeartBeatIntervalInMins int
// Enable thread for getting metadata from wireserver
DisableMetadataRefreshThread bool
// Refresh interval in milliseconds for metadata thread
RefreshIntervalInSecs int
// Disable debug logging for telemetry messages
DebugMode bool
// Interval for sending snapshot events.
SnapshotIntervalInMins int
}
Click to show internal directories.
Click to hide internal directories.