-
Notifications
You must be signed in to change notification settings - Fork 263
Expand file tree
/
Copy pathmetadata.go
More file actions
43 lines (36 loc) · 1.61 KB
/
Copy pathmetadata.go
File metadata and controls
43 lines (36 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT
package detector
// Metadata represents discovered information about a resource including its categories, details, and current Status.
type Metadata struct {
// Categories can be one or more ordered Category entries that a detector matched. For example, a Tomcat detector
// would match both JVM and Tomcat.
Categories []Category `json:"categories"`
// Name is the identifier of the resource.
Name string `json:"name,omitempty"`
// Attributes can be used to supply additional optional information.
Attributes map[string]string `json:"attributes,omitempty"`
// TelemetryPort is the port for the resource that exposes telemetry.
TelemetryPort int `json:"telemetry_port,omitempty"`
// Status is the current status of telemetry availability for the resource.
Status Status `json:"status"`
}
// MetadataSlice is a grouping on Metadata entries.
type MetadataSlice []*Metadata
// Category represents a classification type for discovered resources.
type Category string
const (
CategoryJVM Category = "JVM"
CategoryTomcat Category = "TOMCAT"
CategoryKafkaBroker Category = "KAFKA/BROKER"
CategoryKafkaClient Category = "KAFKA/CLIENT"
CategoryNvidiaGPU Category = "NVIDIA_GPU"
CategoryPostgreSQL Category = "POSTGRESQL"
)
// Status represents whether the resource requires more actions before telemetry is available.
type Status string
var (
StatusReady Status = "READY"
StatusNeedsSetupJmxPort Status = "NEEDS_SETUP/JMX_PORT"
StatusNeedsSetupNvidiaDriver Status = "NEEDS_SETUP/NVIDIA_DRIVER"
)