Skip to content

Commit dee54bf

Browse files
authored
Merge pull request #1400 from gouthamve/expose-tm-config
Expose table manager config for yaml
2 parents 64e394c + 547353d commit dee54bf

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

pkg/chunk/table_manager.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,39 +47,39 @@ func init() {
4747
// TableManagerConfig holds config for a TableManager
4848
type TableManagerConfig struct {
4949
// Master 'off-switch' for table capacity updates, e.g. when troubleshooting
50-
ThroughputUpdatesDisabled bool
50+
ThroughputUpdatesDisabled bool `yaml:"throughput_updates_disabled"`
5151

5252
// Master 'on-switch' for table retention deletions
53-
RetentionDeletesEnabled bool
53+
RetentionDeletesEnabled bool `yaml:"retention_deletes_enabled"`
5454

5555
// How far back tables will be kept before they are deleted
56-
RetentionPeriod time.Duration
56+
RetentionPeriod time.Duration `yaml:"retention_period"`
5757

5858
// Period with which the table manager will poll for tables.
59-
DynamoDBPollInterval time.Duration
59+
DynamoDBPollInterval time.Duration `yaml:"dynamodb_poll_interval"`
6060

6161
// duration a table will be created before it is needed.
62-
CreationGracePeriod time.Duration
62+
CreationGracePeriod time.Duration `yaml:"creation_grace_period"`
6363

64-
IndexTables ProvisionConfig
65-
ChunkTables ProvisionConfig
64+
IndexTables ProvisionConfig `yaml:"index_tables_provisioning"`
65+
ChunkTables ProvisionConfig `yaml:"chunk_tables_provisioning"`
6666
}
6767

6868
// ProvisionConfig holds config for provisioning capacity (on DynamoDB)
6969
type ProvisionConfig struct {
70-
ProvisionedThroughputOnDemandMode bool
71-
ProvisionedWriteThroughput int64
72-
ProvisionedReadThroughput int64
73-
InactiveThroughputOnDemandMode bool
74-
InactiveWriteThroughput int64
75-
InactiveReadThroughput int64
76-
77-
WriteScale AutoScalingConfig
78-
InactiveWriteScale AutoScalingConfig
79-
InactiveWriteScaleLastN int64
80-
ReadScale AutoScalingConfig
81-
InactiveReadScale AutoScalingConfig
82-
InactiveReadScaleLastN int64
70+
ProvisionedThroughputOnDemandMode bool `yaml:"provisioned_throughput_on_demand_mode"`
71+
ProvisionedWriteThroughput int64 `yaml:"provisioned_write_throughput"`
72+
ProvisionedReadThroughput int64 `yaml:"provisioned_read_throughput"`
73+
InactiveThroughputOnDemandMode bool `yaml:"inactive_throughput_on_demand_mode"`
74+
InactiveWriteThroughput int64 `yaml:"inactive_write_throughput"`
75+
InactiveReadThroughput int64 `yaml:"inactive_read_throughput"`
76+
77+
WriteScale AutoScalingConfig `yaml:"write_scale"`
78+
InactiveWriteScale AutoScalingConfig `yaml:"inactive_write_scale"`
79+
InactiveWriteScaleLastN int64 `yaml:"inactive_write_scale_lastn"`
80+
ReadScale AutoScalingConfig `yaml:"read_scale"`
81+
InactiveReadScale AutoScalingConfig `yaml:"inactive_read_scale"`
82+
InactiveReadScaleLastN int64 `yaml:"inactive_read_scale_lastn"`
8383
}
8484

8585
// RegisterFlags adds the flags required to config this to the given FlagSet.

0 commit comments

Comments
 (0)