Documentation
¶
Index ¶
- func GetProviderGUIDFromName(providerName string) string
- func UpdateLogSources(base64EncodedJSONLogConfig string, useDefaultLogSources bool, ...) (string, error)
- func UpdateLogSourcesFromInfo(userLogSources LogSourcesInfo, useDefaultLogSources bool, includeGUIDs bool) (string, error)
- type EtwProvider
- type LogConfig
- type LogSourcesInfo
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProviderGUIDFromName ¶
GetProviderGUIDFromName returns the provider GUID for a given provider name. If the provider name is not found in the map, it returns an empty string.
func UpdateLogSources ¶
func UpdateLogSources(base64EncodedJSONLogConfig string, useDefaultLogSources bool, includeGUIDs bool) (string, error)
UpdateLogSources updates the user provided log sources with the default log sources based on the configuration and returns the updated log sources as a base64 encoded JSON string. If there is an error in the process, it returns the original user provided log sources string.
func UpdateLogSourcesFromInfo ¶
func UpdateLogSourcesFromInfo(userLogSources LogSourcesInfo, useDefaultLogSources bool, includeGUIDs bool) (string, error)
UpdateLogSourcesFromInfo is the parsed-input variant of UpdateLogSources for callers that already have a LogSourcesInfo in hand (e.g. the gcs-sidecar after it decoded the payload for policy enforcement) and want to avoid a second base64-decode + JSON-unmarshal round-trip.
An empty userLogSources is equivalent to passing "" to UpdateLogSources.
Types ¶
type EtwProvider ¶
type LogSourcesInfo ¶
type LogSourcesInfo struct {
LogConfig LogConfig `json:"LogConfig"`
}
Log Sources JSON structure
func DecodeAndUnmarshalLogSources ¶
func DecodeAndUnmarshalLogSources(base64EncodedJSONLogConfig string) (LogSourcesInfo, error)
DecodeAndUnmarshalLogSources decodes a base64-encoded JSON string and unmarshals it into a LogSourcesInfo.
func GetDefaultLogSources ¶
func GetDefaultLogSources() LogSourcesInfo
GetDefaultLogSources returns the default log sources configuration.
type Source ¶
type Source struct {
Type string `json:"type"`
Providers []EtwProvider `json:"providers"`
}