Change json config naming

This commit is contained in:
Mak Muftic 2021-09-24 13:53:31 +02:00
parent 0c390d12f7
commit 9332b9f399
3 changed files with 10 additions and 4 deletions

View File

@ -528,7 +528,7 @@ Type: Array of multiaddress peerinfo strings, must include peerid (/p2p/12D3K...
Comment: ``, Comment: ``,
}, },
{ {
Name: "JsonTracerFile", Name: "JsonTracer",
Type: "string", Type: "string",
Comment: ``, Comment: ``,
@ -537,6 +537,12 @@ Type: Array of multiaddress peerinfo strings, must include peerid (/p2p/12D3K...
Name: "ElasticSearchTracer", Name: "ElasticSearchTracer",
Type: "string", Type: "string",
Comment: ``,
},
{
Name: "TracerSourceAuth",
Type: "string",
Comment: ``, Comment: ``,
}, },
}, },

View File

@ -309,7 +309,7 @@ type Pubsub struct {
DirectPeers []string DirectPeers []string
IPColocationWhitelist []string IPColocationWhitelist []string
RemoteTracer string RemoteTracer string
JsonTracerFile string JsonTracer string
ElasticSearchTracer string ElasticSearchTracer string
TracerSourceAuth string TracerSourceAuth string
} }

View File

@ -366,8 +366,8 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
100))) 100)))
var transports []tracer.TracerTransport var transports []tracer.TracerTransport
if in.Cfg.JsonTracerFile != "" { if in.Cfg.JsonTracer != "" {
jsonTransport, err := tracer.NewJsonTracerTransport(in.Cfg.JsonTracerFile) jsonTransport, err := tracer.NewJsonTracerTransport(in.Cfg.JsonTracer)
if err != nil { if err != nil {
return nil, err return nil, err
} }