Documentation ¶
Overview ¶
Package server implements the dcounter server
For example usage see: https://github.com/atomx/dcounter/blob/master/server.go#L128
Index ¶
- Constants
- type Counter
- type Counters
- type Errors
- type Server
- func (s *Server) GetBroadcasts(overhead, limit int) [][]byte
- func (s *Server) Join(hosts []string) error
- func (s *Server) Kill() error
- func (s *Server) Load(filename string) error
- func (s *Server) LocalState(join bool) []byte
- func (s *Server) MergeRemoteState(buf []byte, join bool)
- func (s *Server) NodeMeta(limit int) []byte
- func (s *Server) NotifyJoin(node *memberlist.Node)
- func (s *Server) NotifyLeave(node *memberlist.Node)
- func (s *Server) NotifyMsg(msg []byte)
- func (s *Server) NotifyUpdate(node *memberlist.Node)
- func (s *Server) Save(filename string) (err error)
- func (s *Server) Start() error
- func (s *Server) Stop() error
Constants ¶
View Source
const VERSION = "master"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { Config *memberlist.Config // contains filtered or unexported fields }
func (*Server) GetBroadcasts ¶
func (*Server) LocalState ¶
LocalState is called when memberlist wants to do a full TCP state transfer to one random node. Since it's only one random node we shouldn't reset s.changes here.
func (*Server) MergeRemoteState ¶
func (*Server) NotifyJoin ¶
func (s *Server) NotifyJoin(node *memberlist.Node)
func (*Server) NotifyLeave ¶
func (s *Server) NotifyLeave(node *memberlist.Node)
func (*Server) NotifyUpdate ¶
func (s *Server) NotifyUpdate(node *memberlist.Node)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.