Skip to content

Commit

Permalink
Migrate elasticsearch rollover to go (#3242)
Browse files Browse the repository at this point in the history
* Index rollover golang migration, init action

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Add rollover action to es-rollover cmd

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Add lookback command

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Fix usage of commands, add host positional arg

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Rename some variables, move some fuctions to pkg/es for reuse it

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Reuse code, move commands to main

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Move filters to pkg/es

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Simplified the es index client code

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Initialie subcommand configs

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Add comments to exported methods and types

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Remove spaces, rename some functions to align it more with the functionality

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Change how to init and handle global variables

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Fix default unit for lookback command

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Validate positional argument

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Separate ILM into his own client api

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Fix index client delete test

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Add index client tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Add flags tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Index filter tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Add index option tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* fix filter tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Actions unit tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* test rollover action

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Init action tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Add lookback tests

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Minor code style changes

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* remove empty_test.go from mocks package

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Bind correct root flags

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Return response errors on index client methods if its possible

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Fix some code styles, extra spaces etc..

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>

* Rename addRootFlags function

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
  • Loading branch information
rubenvp8510 authored Sep 9, 2021
1 parent 6133811 commit f5bb954
Show file tree
Hide file tree
Showing 43 changed files with 3,692 additions and 385 deletions.
144 changes: 0 additions & 144 deletions cmd/es-index-cleaner/app/index_client.go

This file was deleted.

214 changes: 0 additions & 214 deletions cmd/es-index-cleaner/app/index_client_test.go

This file was deleted.

Loading

0 comments on commit f5bb954

Please sign in to comment.