-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
707066f
commit 29315ce
Showing
4 changed files
with
163 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package gossip | ||
|
||
import "github.com/andydunstall/pico/serverv2/netmap" | ||
|
||
// Gossip is responsible for maintaining the nodes local NetworkMap and | ||
// propagating the state of the local node to the rest of the cluster. | ||
// | ||
// It uses the 'kite' library for cluster membership anti-entropy, where each | ||
// node maintains a local key-value store containing the nodes state which is | ||
// then propagated to the other nodes in the cluster. Therefore Gossip | ||
// manages updating the local key-value for this node, and watching for updates | ||
// to other nodes and adding them to the netmap. | ||
type Gossip struct { | ||
} | ||
|
||
func NewGossip(_ *netmap.NetworkMap) (*Gossip, error) { | ||
return &Gossip{}, nil | ||
} | ||
|
||
func (g *Gossip) Join(_ []string) error { | ||
return nil | ||
} | ||
|
||
func (g *Gossip) Leave() error { | ||
return nil | ||
} | ||
|
||
func (g *Gossip) Close() error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters