Documentation ¶
Index ¶
- Constants
- Variables
- type Timestream
- func (t *Timestream) Close() error
- func (t *Timestream) Connect() error
- func (t *Timestream) Description() string
- func (t *Timestream) SampleConfig() string
- func (t *Timestream) TransformMetrics(metrics []telegraf.Metric) []*timestreamwrite.WriteRecordsInput
- func (t *Timestream) Write(metrics []telegraf.Metric) error
- type WriteClient
Constants ¶
View Source
const ( MappingModeSingleTable = "single-table" MappingModeMultiTable = "multi-table" )
Mapping modes specify how Telegraf model should be represented in Timestream model. See sample config for more details.
View Source
const MaxRecordsPerCall = 100
MaxRecordsPerCall reflects Timestream limit of WriteRecords API call
Variables ¶
View Source
var WriteFactory = func(credentialConfig *internalaws.CredentialConfig) WriteClient { configProvider := credentialConfig.Credentials() return timestreamwrite.New(configProvider) }
WriteFactory function provides a way to mock the client instantiation for testing purposes.
Functions ¶
This section is empty.
Types ¶
type Timestream ¶
type Timestream struct { Region string `toml:"region"` AccessKey string `toml:"access_key"` SecretKey string `toml:"secret_key"` RoleARN string `toml:"role_arn"` Profile string `toml:"profile"` Filename string `toml:"shared_credential_file"` Token string `toml:"token"` EndpointURL string `toml:"endpoint_url"` MappingMode string `toml:"mapping_mode"` DescribeDatabaseOnStart bool `toml:"describe_database_on_start"` DatabaseName string `toml:"database_name"` SingleTableName string `toml:"single_table_name"` SingleTableDimensionNameForTelegrafMeasurementName string `toml:"single_table_dimension_name_for_telegraf_measurement_name"` CreateTableIfNotExists bool `toml:"create_table_if_not_exists"` CreateTableMagneticStoreRetentionPeriodInDays int64 `toml:"create_table_magnetic_store_retention_period_in_days"` CreateTableMemoryStoreRetentionPeriodInHours int64 `toml:"create_table_memory_store_retention_period_in_hours"` CreateTableTags map[string]string `toml:"create_table_tags"` Log telegraf.Logger // contains filtered or unexported fields }
func (*Timestream) Close ¶
func (t *Timestream) Close() error
func (*Timestream) Connect ¶
func (t *Timestream) Connect() error
func (*Timestream) Description ¶
func (t *Timestream) Description() string
func (*Timestream) SampleConfig ¶
func (t *Timestream) SampleConfig() string
func (*Timestream) TransformMetrics ¶
func (t *Timestream) TransformMetrics(metrics []telegraf.Metric) []*timestreamwrite.WriteRecordsInput
TransformMetrics transforms a collection of Telegraf Metrics into write requests to Timestream. Telegraf Metrics are grouped by Name, Tag Keys and Time to use Timestream CommonAttributes. Returns collection of write requests to be performed to Timestream.
type WriteClient ¶
type WriteClient interface { CreateTable(*timestreamwrite.CreateTableInput) (*timestreamwrite.CreateTableOutput, error) WriteRecords(*timestreamwrite.WriteRecordsInput) (*timestreamwrite.WriteRecordsOutput, error) DescribeDatabase(*timestreamwrite.DescribeDatabaseInput) (*timestreamwrite.DescribeDatabaseOutput, error) }
Click to show internal directories.
Click to hide internal directories.