This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user