-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
types.go
39 lines (36 loc) · 1.53 KB
/
types.go
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
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package gcp // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/gcp"
import "github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp"
// gcpDetector can detect attributes of GCP environments.
// It is implemented by
// github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp
// and is defined here for testing.
type gcpDetector interface {
ProjectID() (string, error)
CloudPlatform() gcp.Platform
GKEAvailabilityZoneOrRegion() (string, gcp.LocationType, error)
GKEClusterName() (string, error)
GKEHostID() (string, error)
FaaSName() (string, error)
FaaSVersion() (string, error)
FaaSID() (string, error)
FaaSCloudRegion() (string, error)
AppEngineFlexAvailabilityZoneAndRegion() (string, string, error)
AppEngineStandardAvailabilityZone() (string, error)
AppEngineStandardCloudRegion() (string, error)
AppEngineServiceName() (string, error)
AppEngineServiceVersion() (string, error)
AppEngineServiceInstance() (string, error)
GCEAvailabilityZoneAndRegion() (string, string, error)
GCEHostType() (string, error)
GCEHostID() (string, error)
GCEHostName() (string, error)
CloudRunJobExecution() (string, error)
CloudRunJobTaskIndex() (string, error)
GCEInstanceHostname() (string, error)
GCEInstanceName() (string, error)
BareMetalSolutionInstanceID() (string, error)
BareMetalSolutionCloudRegion() (string, error)
BareMetalSolutionProjectID() (string, error)
}