Tizen_4.0 base
[platform/upstream/docker-engine.git] / vendor / github.com / hashicorp / serf / serf / broadcast.go
1 package serf
2
3 import (
4         "github.com/hashicorp/memberlist"
5 )
6
7 // broadcast is an implementation of memberlist.Broadcast and is used
8 // to manage broadcasts across the memberlist channel that are related
9 // only to Serf.
10 type broadcast struct {
11         msg    []byte
12         notify chan<- struct{}
13 }
14
15 func (b *broadcast) Invalidates(other memberlist.Broadcast) bool {
16         return false
17 }
18
19 func (b *broadcast) Message() []byte {
20         return b.msg
21 }
22
23 func (b *broadcast) Finished() {
24         if b.notify != nil {
25                 close(b.notify)
26         }
27 }