From 3433fa4a6e6f1fc07619ab8aadf9c1a4c8572242 Mon Sep 17 00:00:00 2001 From: Mak Muftic Date: Wed, 29 Sep 2021 12:51:43 +0200 Subject: [PATCH] Add stringdocs to config props and generate docs --- node/config/doc_gen.go | 17 ++++++++++++++--- node/config/types.go | 17 +++++++++++++---- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index 21e9ccc6b..c9079dac4 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -531,19 +531,30 @@ Type: Array of multiaddress peerinfo strings, must include peerid (/p2p/12D3K... Name: "JsonTracer", Type: "string", - Comment: ``, + Comment: `Path to file that will be used to output tracer content in JSON format. +If present tracer will save data to defined file. +Format: file path`, }, { Name: "ElasticSearchTracer", Type: "string", - Comment: ``, + Comment: `Connection string for elasticsearch instance. +If present tracer will save data to elasticsearch. +Format: https://:@:/`, + }, + { + Name: "ElasticSearchIndex", + Type: "string", + + Comment: `Name of elasticsearch index that will be used to save tracer data. +This property is used only if ElasticSearchTracer propery is set.`, }, { Name: "TracerSourceAuth", Type: "string", - Comment: ``, + Comment: `Auth token that will be passed with logs to elasticsearch - used for weighted peers score.`, }, }, "RetrievalPricing": []DocField{ diff --git a/node/config/types.go b/node/config/types.go index a7de81328..b8320be20 100644 --- a/node/config/types.go +++ b/node/config/types.go @@ -309,10 +309,19 @@ type Pubsub struct { DirectPeers []string IPColocationWhitelist []string RemoteTracer string - JsonTracer string - ElasticSearchTracer string - ElasticSearchIndex string - TracerSourceAuth string + // Path to file that will be used to output tracer content in JSON format. + // If present tracer will save data to defined file. + // Format: file path + JsonTracer string + // Connection string for elasticsearch instance. + // If present tracer will save data to elasticsearch. + // Format: https://:@:/ + ElasticSearchTracer string + // Name of elasticsearch index that will be used to save tracer data. + // This property is used only if ElasticSearchTracer propery is set. + ElasticSearchIndex string + // Auth token that will be passed with logs to elasticsearch - used for weighted peers score. + TracerSourceAuth string } type Chainstore struct {