enable peer payload update
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
f8763a7a16
commit
db23484f9f
1 changed files with 6 additions and 0 deletions
6
agent.go
6
agent.go
|
@ -5,6 +5,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gogo/protobuf/types"
|
||||||
"github.com/hashicorp/memberlist"
|
"github.com/hashicorp/memberlist"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -66,6 +67,11 @@ func (a *Agent) SyncInterval() time.Duration {
|
||||||
return a.memberConfig.PushPullInterval
|
return a.memberConfig.PushPullInterval
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update updates the agent payload
|
||||||
|
func (a *Agent) Update(payload *types.Any) {
|
||||||
|
a.state.Self.Payload = payload
|
||||||
|
}
|
||||||
|
|
||||||
func newSubscribers() *subscribers {
|
func newSubscribers() *subscribers {
|
||||||
return &subscribers{
|
return &subscribers{
|
||||||
subs: make(map[chan *NodeEvent]struct{}),
|
subs: make(map[chan *NodeEvent]struct{}),
|
||||||
|
|
Loading…
Reference in a new issue