From 753cec4cfa03c195cf7e0e50f15b9a2a6812820e Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Thu, 29 May 2014 11:24:37 -0700 Subject: [PATCH] agent: Omit certains keys from the /self endpoint --- command/agent/config.go | 10 +++++----- website/source/docs/agent/http.html.markdown | 7 +------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/command/agent/config.go b/command/agent/config.go index b3130a3680..cd828ed2ae 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -54,7 +54,7 @@ type Config struct { Domain string `mapstructure:"domain"` // Encryption key to use for the Serf communication - EncryptKey string `mapstructure:"encrypt"` + EncryptKey string `mapstructure:"encrypt" json:"-"` // LogLevel is the level of the logs to putout LogLevel string `mapstructure:"log_level"` @@ -144,16 +144,16 @@ type Config struct { // AEInterval controls the anti-entropy interval. This is how often // the agent attempts to reconcile it's local state with the server' // representation of our state. Defaults to every 60s. - AEInterval time.Duration `mapstructure:"-"` + AEInterval time.Duration `mapstructure:"-" json:"-"` // Checks holds the provided check definitions - Checks []*CheckDefinition `mapstructure:"-"` + Checks []*CheckDefinition `mapstructure:"-" json:"-"` // Services holds the provided service definitions - Services []*ServiceDefinition `mapstructure:"-"` + Services []*ServiceDefinition `mapstructure:"-" json:"-"` // ConsulConfig can either be provided or a default one created - ConsulConfig *consul.Config `mapstructure:"-"` + ConsulConfig *consul.Config `mapstructure:"-" json:"-"` } type dirEnts []os.FileInfo diff --git a/website/source/docs/agent/http.html.markdown b/website/source/docs/agent/http.html.markdown index 34a45f4731..6929d022f8 100644 --- a/website/source/docs/agent/http.html.markdown +++ b/website/source/docs/agent/http.html.markdown @@ -305,7 +305,6 @@ It returns a JSON body like this: "DataDir": "/tmp/consul", "DNSRecursor": "", "Domain": "consul.", - "EncryptKey": "", "LogLevel": "INFO", "NodeName": "foobar", "ClientAddr": "127.0.0.1", @@ -333,11 +332,7 @@ It returns a JSON body like this: "UiDir": "", "PidFile": "", "EnableSyslog": false, - "RejoinAfterLeave": false, - "AEInterval": 60000000000, - "Checks": null, - "Services": null, - "ConsulConfig": null + "RejoinAfterLeave": false }, "Member": { "Name": "foobar",