add stan init func
@@ -6,6 +6,7 @@ import (
"os"
"github.com/google/uuid"
+ "github.com/karimra/gnmiClient/outputs"
"github.com/mitchellh/mapstructure"
"github.com/nats-io/nats.go"
"github.com/nats-io/stan.go"
@@ -18,6 +19,14 @@ const (
stanDefaultPingRetry = 2
)
+func init() {
+ outputs.Register("stan", func() outputs.Output {
+ return &StanOutput{
+ Cfg: &Config{},
+ }
+ })
+}
+
// StanOutput //
type StanOutput struct {
Cfg *Config
