Documentation ¶
Index ¶
- Variables
- func EnrichHiveWithCorrelationData(cd *hivev1.ClusterDeployment, correlationData *api.CorrelationData) error
- func EnrichHiveWithResourceID(cd *hivev1.ClusterDeployment, resourceID string) error
- func EnrichWithClusterDeploymentNamespace(log *logrus.Entry, clusterDeploymentNamespace string) *logrus.Entry
- func EnrichWithClusterVersion(log *logrus.Entry, version string) *logrus.Entry
- func EnrichWithCorrelationData(log *logrus.Entry, correlationData *api.CorrelationData) *logrus.Entry
- func EnrichWithPath(log *logrus.Entry, path string) *logrus.Entry
- func EnrichWithResourceID(log *logrus.Entry, resourceID string) *logrus.Entry
- func GetAuditEntry() *logrus.Entry
- func GetLogger() *logrus.Entry
- func LogrWrapper(logger *logrus.Entry) logr.Logger
- func ResetHiveCorrelationData(cd *hivev1.ClusterDeployment) error
- type ResultType
Constants ¶
This section is empty.
Variables ¶
var ( // matches URLs that look like /subscriptions/%s/providers/%s/%s RXProviderResourceKind = regexp.MustCompile(`^/subscriptions/([^/]+)/providers/([^/]+)/([^/]+)$`) // matches URLs that look like /admin/providers/%s/%s RXAdminProvider = regexp.MustCompile(`^/admin/providers/([^/]+)/([^/]+)$`) RXTolerantResourceID = regexp.MustCompile(`(?i)^(?:/admin)?/subscriptions/([^/]+)(?:/resourceGroups/([^/]+)(?:/providers/([^/]+)/([^/]+)(?:/([^/]+))?)?)?`) RXTolerantSubResourceID = regexp.MustCompile(`(?i)^(?:/admin)?/subscriptions/([^/]+)(?:/resourceGroups/([^/]+)(?:/providers/([^/]+)/([^/]+)/([^/]+)(?:/([^/]+))?)?)?`) )
Functions ¶
func EnrichHiveWithCorrelationData ¶
func EnrichHiveWithCorrelationData(cd *hivev1.ClusterDeployment, correlationData *api.CorrelationData) error
EnrichHiveWithCorrelationData sets correlation log fields based on correlationData struct.
func EnrichHiveWithResourceID ¶
func EnrichHiveWithResourceID(cd *hivev1.ClusterDeployment, resourceID string) error
EnrichHiveWithResourceID sets resource log fields based on a cluster resourceID.
func EnrichWithClusterDeploymentNamespace ¶
func EnrichWithClusterDeploymentNamespace(log *logrus.Entry, clusterDeploymentNamespace string) *logrus.Entry
EnrichWithClusterDeploymentNamespace sets log fields based on hiveProfile.Namespace
func EnrichWithClusterVersion ¶
EnrichWithClusterVersion set log fields based on cluster version
func EnrichWithCorrelationData ¶
func EnrichWithCorrelationData(log *logrus.Entry, correlationData *api.CorrelationData) *logrus.Entry
EnrichWithCorrelationData sets log fields based on an optional correlationData struct
func EnrichWithPath ¶
EnrichWithPath parses the URL path for part or all of an Azure resource ID and sets log fields accordingly
func EnrichWithResourceID ¶
EnrichWithResourceID sets log fields based on a resource ID
func GetAuditEntry ¶
GetAuditEntry returns a consistently configured audit log entry
func ResetHiveCorrelationData ¶
func ResetHiveCorrelationData(cd *hivev1.ClusterDeployment) error
ResetHiveCorrelationData removes correlation log fields from ClusterDeployment, if present.
Types ¶
type ResultType ¶
type ResultType string
const ( SuccessResultType ResultType = "Success" UserErrorResultType ResultType = "UserError" ServerErrorResultType ResultType = "InternalServerError" )
func MapStatusCodeToResultType ¶
func MapStatusCodeToResultType(statusCode int) ResultType