Add the ability to set the insertion filter into CLI (#843)

* Add the ability to set the insertion filter into CLI

* Resolve the conflict

* Upgrade Basenine to `v0.5.0` and check the insertion filter against syntax errors inside CLI

* Upgrade Basenine to `v0.5.1`

* Update the sums
This commit is contained in:
M. Mert Yıldıran
2022-03-02 12:51:32 +03:00
committed by GitHub
parent b9f5475e3a
commit 3b063c3bb5
12 changed files with 83 additions and 27 deletions

View File

@@ -62,7 +62,7 @@ func LoadExtensions() {
controllers.InitExtensionsMap(ExtensionsMap)
}
func ConfigureBasenineServer(host string, port string, dbSize int64, logLevel logging.Level) {
func ConfigureBasenineServer(host string, port string, dbSize int64, logLevel logging.Level, insertionFilter string) {
if !wait.New(
wait.WithProto("tcp"),
wait.WithWait(200*time.Millisecond),
@@ -86,6 +86,11 @@ func ConfigureBasenineServer(host string, port string, dbSize int64, logLevel lo
}
}
}
// Set the insertion filter that comes from the config
if err := basenine.InsertionFilter(host, port, insertionFilter); err != nil {
logger.Log.Errorf("Error while setting the insertion filter: %v", err)
}
}
func GetEntryInputChannel() chan *tapApi.OutputChannelItem {