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

Ability to filter by age of a resource #36

Closed
wants to merge 1 commit into from

Conversation

mousavian
Copy link
Contributor

Introducing new filter based on created time of a resource but compared to current time which is non-idempotent version of created.

This enables us to run awsweeper on schedule to clean up stale resources without changing config file.

Let me know what you think. I'd be happy to apply any suggestion for improvement.
Regards

}

type Created struct {
Before *time.Time `yaml:",omitempty"`
After *time.Time `yaml:",omitempty"`
}

type Age struct {
Before *time.Duration `yaml:",omitempty"`
After *time.Duration `yaml:",omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if these terms make sense or not. Any suggestions?
Maybe younger/older? or earlier/later?

@jckuester
Copy link
Owner

Good idea, but we need to unit tests so that I can merge it :)

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

Successfully merging this pull request may close these issues.

2 participants