From db23484f9fd58c722c44644ec86cac31b44e78cc Mon Sep 17 00:00:00 2001 From: Evan Hazlett Date: Thu, 29 Nov 2018 22:57:26 -0500 Subject: [PATCH] enable peer payload update Signed-off-by: Evan Hazlett --- agent.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent.go b/agent.go index 489df4e..1d251f6 100644 --- a/agent.go +++ b/agent.go @@ -5,6 +5,7 @@ import ( "sync" "time" + "github.com/gogo/protobuf/types" "github.com/hashicorp/memberlist" ) @@ -66,6 +67,11 @@ func (a *Agent) SyncInterval() time.Duration { return a.memberConfig.PushPullInterval } +// Update updates the agent payload +func (a *Agent) Update(payload *types.Any) { + a.state.Self.Payload = payload +} + func newSubscribers() *subscribers { return &subscribers{ subs: make(map[chan *NodeEvent]struct{}),