From ae08c186f3644ffaebbcf1224fb2936f1c9193a4 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Tue, 21 Feb 2017 20:57:59 +0100 Subject: Add more slides --- stasherpresent.slide | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/stasherpresent.slide b/stasherpresent.slide index c73f399..d23a837 100644 --- a/stasherpresent.slide +++ b/stasherpresent.slide @@ -4,7 +4,6 @@ Prototyping a logstash alternative 23 February 2017 Silvan Jegen -Computational Linguist me@sillymon.ch https://sillymon.ch @@ -92,6 +91,9 @@ Custom configuration language - 7'000+ stars +* Stasher + + * Stasher Why? @@ -100,12 +102,24 @@ Why? - Generality of the work flow - I like Go +Code available at +.link https://sillymon.ch/cgit/stasher/ https://sillymon.ch/cgit/stasher/ + * Implementation +* Implementation + +1. Interfaces +2. Manager +3. Unfinished stuff (error handling, registry and config parser) + + * Interfaces +{input,filter,output}/interface.go + type Input interface { Start() chan *work.Work } @@ -123,6 +137,8 @@ Why? * Manager +manager/manager.go + type Manager struct { Input input.Input Filter filter.Filter @@ -157,6 +173,7 @@ Why? wg.Wait() } + * Main advantages over shell script - Error handling @@ -167,8 +184,8 @@ Why? * Error handling for w := range ic { - if w.Err != nil { - fmt.Printf("Got an error when getting Work input: %q\n", w.Err) + if w.Error() != nil { + fmt.Printf("Got an error when getting Work input: %q\n", w.Error()) continue } wg.Add(1) @@ -182,7 +199,6 @@ Why? if err != nil { fmt.Printf("Got an error when outputting Work: %q\n", err) } - wg.Done() }(w) } @@ -235,7 +251,16 @@ conf/init.go ) -* Demo +* Implemented modules + +- input: stdin, http + +- filter: str(ing), http + +- output: stdout, http + + +* Demo (a.k.a. "It totally works, I swear!") * High-level TODOs -- cgit v1.2.3