svej
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-12-06 14:32:50 +01:00
parent 8085f8937e
commit d7c30ef0eb
5 changed files with 184 additions and 9 deletions

View File

@ -1,4 +1,4 @@
package sve
package sver
import (
"log"
@ -14,7 +14,7 @@ import (
var idSeq int = 0
type SingleValueExtractorHandler struct {
type SingleValueExtractorRegexHandler struct {
id int
ready bool
config localConfig
@ -40,8 +40,8 @@ type localConfig struct {
}
func NewSveHandler(config config.HandlerConfigT) handler.Handler {
t := &SingleValueExtractorHandler {
func NewSverHandler(config config.HandlerConfigT) handler.Handler {
t := &SingleValueExtractorRegexHandler {
id: idSeq,
ready: false,
}
@ -117,7 +117,7 @@ func NewSveHandler(config config.HandlerConfigT) handler.Handler {
return t
}
func (self *SingleValueExtractorHandler) GetId() string {
func (self *SingleValueExtractorRegexHandler) GetId() string {
return fmt.Sprintf("SVE%d", self.id)
}
@ -125,7 +125,7 @@ func lost(msg string, message handler.MessageT) {
log.Printf("Error: %s, message %s is lost", msg, message)
}
func (self *SingleValueExtractorHandler) Handle(message handler.MessageT) {
func (self *SingleValueExtractorRegexHandler) Handle(message handler.MessageT) {
if ! self.ready {
log.Println("Handler is not marked as ready, message %s is lost", message)
return