enable peer payload update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2018-11-29 22:57:26 -05:00
parent f8763a7a16
commit db23484f9f
No known key found for this signature in database
GPG key ID: A519480096146526

View file

@ -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{}),