Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TimePeriodInSecBeforeTsidxReduction for Index #146

Open
IPrototypeI opened this issue Jan 4, 2023 · 2 comments
Open

Add TimePeriodInSecBeforeTsidxReduction for Index #146

IPrototypeI opened this issue Jan 4, 2023 · 2 comments

Comments

@IPrototypeI
Copy link

Adding new parameter for index creation.

Hello would it be possible to add following parameter TimePeriodInSecBeforeTsidxReduction as optional for index creation
You just have to extend

type IndexObject
TimePeriodInSecBeforeTsidxReduction int json:"timePeriodInSecBeforeTsidxReduction,omitempty" url:"timePeriodInSecBeforeTsidxReduction,omitempty"``

and getIndexConfig with

indexConfigObject.TimePeriodInSecBeforeTsidxReduction = d.Get("time_period_in_sec_before_tsidx_reduction").(int)

this would be the description
"time_period_in_sec_before_tsidx_reduction": { Type: schema.TypeInt, Optional: true, Computed: true, Description:The amount of time, in seconds, between service runs to reduce the tsidx files for any buckets that have reached the age specified by
'timePeriodInSecBeforeTsidxReduction', },

and for the error handling

if err = d.Set("time_period_in_sec_before_tsidx_reduction", entry.Content.TimePeriodInSecBeforeTsidxReduction); err != nil { return err }

@anushjay
Copy link
Collaborator

@IPrototypeI Would be a great addition. Do you mind creating a PR and adding the field to the existing test for indexes? I'm happy to review and merge the changes.

@IPrototypeI
Copy link
Author

@anushjay awesome I will go ahead and create a pullrequest for each of the features :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants