Documentation ¶
Index ¶
- type AddLabels
- type Aggregation
- type Config
- type DiskEndpoint
- type EncodedServiceAccountKey
- type Endpoint
- type Endpoints
- type Filter
- type Filters
- type GCPIdentity
- type Heartbeat
- type Identities
- type Identity
- type LiteralServiceAccountKey
- type Metric
- type MetricEndpoint
- type Metrics
- type Passthrough
- type PubSubEndpoint
- type ServiceControlEndpoint
- type Source
- type Sources
- type Validatable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddLabels ¶
type AddLabels struct { OmitEmpty bool `json:"omitEmpty"` Labels map[string]string `json:"labels"` }
func (*AddLabels) IncludedLabels ¶
IncludedLabels returns the labels that should be added to input. Empty label values are omitted if OmitEmpty is true.
type Aggregation ¶
type Aggregation struct { // The number of seconds that metrics should be aggregated prior to forwarding BufferSeconds int64 `json:"bufferSeconds"` }
type Config ¶
type Config struct { Identities Identities `json:"identities"` Metrics Metrics `json:"metrics"` Endpoints Endpoints `json:"endpoints"` Sources Sources `json:"sources"` Filters Filters `json:"filters"` }
Config contains configuration for the agent.
type DiskEndpoint ¶
type DiskEndpoint struct { ReportDir string `json:"reportDir"` ExpireSeconds int64 `json:"expireSeconds"` }
func (*DiskEndpoint) Validate ¶
func (e *DiskEndpoint) Validate(c *Config) error
type EncodedServiceAccountKey ¶
type EncodedServiceAccountKey []byte
EncodedServiceAccountKey is a byte array type that can hold a base64-encoded json structure. It validates that its value is valid base64-encoded json upon parsing. Upon parsing, the contents of the byte array will be the json text after base64 decoding is performed.
func (*EncodedServiceAccountKey) UnmarshalJSON ¶
func (k *EncodedServiceAccountKey) UnmarshalJSON(data []byte) error
UnmarshalJSON sets *m to a copy of data.
type Endpoint ¶
type Endpoint struct { Name string `json:"name"` Disk *DiskEndpoint `json:"disk"` ServiceControl *ServiceControlEndpoint `json:"servicecontrol"` PubSub *PubSubEndpoint `json:"pubsub"` }
Endpoint describes a single remote endpoint used for sending aggregated metrics.
type Endpoints ¶
type Endpoints []Endpoint
Type Endpoints is a Validatable collection of Endpoint objects.
type GCPIdentity ¶
type GCPIdentity struct { ServiceAccountKey *LiteralServiceAccountKey `json:"serviceAccountKey"` EncodedServiceAccountKey *EncodedServiceAccountKey `json:"encodedServiceAccountKey"` }
GCPIdentity holds configuration for identifying to Google Cloud Platform services.
func (*GCPIdentity) GetServiceAccountKey ¶
func (c *GCPIdentity) GetServiceAccountKey() []byte
func (*GCPIdentity) Validate ¶
func (i *GCPIdentity) Validate(c *Config) error
type Heartbeat ¶
type Identities ¶
type Identities []Identity
Type Identities is a Validatable collection of Identity objects.
func (Identities) Get ¶
func (identities Identities) Get(name string) *Identity
func (Identities) Validate ¶
func (identities Identities) Validate(c *Config) error
type Identity ¶
type Identity struct { Name string `json:"name"` GCP *GCPIdentity `json:"gcp"` }
type LiteralServiceAccountKey ¶
type LiteralServiceAccountKey []byte
LiteralServiceAccountKey is a byte array type that can hold a literal json structure. It validates that its value is valid json upon parsing. After parsing, the contents of the byte array will be the original json text.
func (*LiteralServiceAccountKey) UnmarshalJSON ¶
func (k *LiteralServiceAccountKey) UnmarshalJSON(data []byte) error
type Metric ¶
type Metric struct { metrics.Definition `json:",inline"` Endpoints []MetricEndpoint `json:"endpoints"` // oneof - buffering configuration Aggregation *Aggregation `json:"aggregation"` Passthrough *Passthrough `json:"passthrough"` }
type MetricEndpoint ¶
type MetricEndpoint struct {
Name string `json:"name"`
}
type Metrics ¶
type Metrics []Metric
func (Metrics) GetMetricDefinition ¶
func (m Metrics) GetMetricDefinition(name string) *metrics.Definition
GetMetricDefinition returns the metrics.Definition with the given name, or nil if it does not exist.
type Passthrough ¶
type Passthrough struct { }
type PubSubEndpoint ¶
func (*PubSubEndpoint) Validate ¶
func (e *PubSubEndpoint) Validate(c *Config) error
type ServiceControlEndpoint ¶
type ServiceControlEndpoint struct { Identity string `json:"identity"` ServiceName string `json:"serviceName"` ConsumerId string `json:"consumerId"` }
func (*ServiceControlEndpoint) Validate ¶
func (e *ServiceControlEndpoint) Validate(c *Config) error