Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // FallbackQueryInterval ... FallbackQueryInterval = int64(5) // DefaultInterval ... DefaultInterval = time.Duration(FallbackQueryInterval) * time.Minute )
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct { Endpoint string SchemaVersion string Status string Limits Limits // schemas Definitions Definitions }
AgentConfig is the output configuration used to handle outgoing request
func (AgentConfig) CanCollect ¶
func (c AgentConfig) CanCollect() bool
CanCollect will return whether or not collecting of metrics should occur.
func (AgentConfig) CanPublish ¶
func (c AgentConfig) CanPublish() bool
CanPublish will return whether or not publishing of metrics should occur.
func (AgentConfig) IsTerminated ¶
func (c AgentConfig) IsTerminated() bool
func (AgentConfig) ShouldPublishInternalMetrics ¶
func (c AgentConfig) ShouldPublishInternalMetrics() bool
While the logic is currently equivalent to CanCollect's, this is a separate concept
func (AgentConfig) String ¶
func (c AgentConfig) String() string
type ConfigProvider ¶
type ConfigProvider interface { RetrieveAgentConfig() AgentConfig Close() }
ConfigProvider will allow the output plugin to retrieve specific configuration to change the behavior of the agent.
var Config ConfigProvider
Config ...
func NewCSMConfigProvider ¶
func NewCSMConfigProvider(svc csmiface.CSMAPI, interval time.Duration) ConfigProvider
NewCSMConfigProvider will return a config provider. Will also start an interval goroutine that will poll the config service and construct a new agent config from that.
type ContinueError ¶
type ContinueError interface {
Continue() bool
}
ContinueError will allow for us to see if we need to continue in a loop
type Definitions ¶
type Definitions struct { Entries EventEntryDefinitions Events EventDefinitions }
Definitions ...
func DefaultDefinitions ¶
func DefaultDefinitions() Definitions
DefaultDefinitions will return the default definitions used by the agent prior to reaching out to the control plane.
func (Definitions) String ¶
func (d Definitions) String() string
type EventDefinition ¶
EventDefinition represents a definition of a monitoring event.
type EventDefinitions ¶
type EventDefinitions struct {
// contains filtered or unexported fields
}
EventDefinitions ...
func DefaultEventDefinitions ¶
func DefaultEventDefinitions() EventDefinitions
DefaultEventDefinitions will return a specified default of EventDefinitions which will be used before the schema had been retrieved by the provider.
func (*EventDefinitions) Get ¶
func (d *EventDefinitions) Get(key string) (EventDefinition, bool)
Get will retrieve the event definition and if one was not present at the given key, it will return false for the second parameter.
func (*EventDefinitions) Set ¶
func (d *EventDefinitions) Set(key string, def EventDefinition)
Set will set a metric definition to the given key
func (EventDefinitions) String ¶
func (d EventDefinitions) String() string
type EventEntryDefinition ¶
type EventEntryDefinition struct { KeyType EventEntryKeyType Type MetricType Name string }
EventEntryDefinition represents a definition of an event and the necessary information on how this metric should be aggregated.
type EventEntryDefinitions ¶
type EventEntryDefinitions struct {
// contains filtered or unexported fields
}
EventEntryDefinitions is a map of metric definitions
func DefaultEventEntryDefinitions ¶
func DefaultEventEntryDefinitions() EventEntryDefinitions
DefaultEventEntryDefinitions ...
func (*EventEntryDefinitions) Get ¶
func (d *EventEntryDefinitions) Get(key string) (EventEntryDefinition, bool)
Get ...
func (*EventEntryDefinitions) Set ¶
func (d *EventEntryDefinitions) Set(key string, def EventEntryDefinition)
Set will set a metric definition to the given key
func (EventEntryDefinitions) String ¶
func (d EventEntryDefinitions) String() string
type EventEntryKeyType ¶
type EventEntryKeyType string
EventEntryKeyType is a type alias of string that will allow for helper methods to check whether or not it is of a certain enum
func NewEventEntryKeyType ¶
func NewEventEntryKeyType(k *string) (EventEntryKeyType, error)
NewEventEntryKeyType return a new metric key type and will return a loop control error if k is nil.
func (EventEntryKeyType) IsAggregation ¶
func (m EventEntryKeyType) IsAggregation() bool
IsAggregation will return true is if the metric is a aggregation type
func (EventEntryKeyType) IsAggregationTimestamp ¶
func (m EventEntryKeyType) IsAggregationTimestamp() bool
IsAggregationTimestamp will return true is if the metric is a aggregation timestamp type
func (EventEntryKeyType) IsNone ¶
func (m EventEntryKeyType) IsNone() bool
IsNone will return true is if the metric is a none type
func (EventEntryKeyType) IsSample ¶
func (m EventEntryKeyType) IsSample() bool
IsSample will return true is if the metric is a sample type
type Limits ¶
type Limits struct { MaxCompressedSampleSize int MaxUncompressedSampleSize int MaxSEHBuckets int MaxFrequencyDistributionKeySize int MaxAggregationKeyValueSize int MaxFrequencyDistributionSize int MaxRecords int MaxPublishingMetricsPerCall int }
Limits ...
type MetricType ¶
type MetricType string
MetricType is a type aliased string used to check for valid enums through utilit methods.
func NewMetricType ¶
func NewMetricType(t *string) (MetricType, error)
NewMetricType will return a new metric type as long as t is not nil. If t is nil, a loop control error.
func (MetricType) IsFrequency ¶
func (m MetricType) IsFrequency() bool
IsFrequency signifies a frequency metric.
func (MetricType) IsNone ¶
func (m MetricType) IsNone() bool
IsNone signifies a metric type that does not have any classification.
type MockConfigProvider ¶
type MockConfigProvider struct{}
func (*MockConfigProvider) Close ¶
func (c *MockConfigProvider) Close()
func (*MockConfigProvider) RetrieveAgentConfig ¶
func (c *MockConfigProvider) RetrieveAgentConfig() AgentConfig
func (*MockConfigProvider) Write ¶
func (c *MockConfigProvider) Write(metrics metametrics.Metrics) error