coordinator

package
v0.0.0-...-57ac6aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {

	// RPC Interface
	*rpc.Server
	// contains filtered or unexported fields
}

Server is the main logic for the central coordinator

func NewServer

func NewServer(name string, addr string, config common.Config, servers []notify.Interface, snapshotThreshold uint64, snapshotInterval time.Duration) (*Server, error)

NewServer creates a new Talek centralized coordinator server

func (*Server) AddServer

func (s *Server) AddServer(server notify.Interface)

AddServer adds a server to the list that is notified on snapshot changes

func (*Server) Close

func (s *Server) Close()

Close shuts down the server

func (*Server) Commit

func (s *Server) Commit(args *coordinator.CommitArgs, reply *coordinator.CommitReply) error

Commit accepts a single Write to commit without data. Used to maintain the cuckoo table

func (*Server) GetCommonConfig

func (s *Server) GetCommonConfig(args *interface{}, reply *common.Config) error

GetCommonConfig returns the common global config

func (*Server) GetInfo

func (s *Server) GetInfo(args *interface{}, reply *coordinator.GetInfoReply) error

GetInfo returns information about this server

func (*Server) GetIntVec

func (s *Server) GetIntVec(args *coordinator.GetIntVecArgs, reply *coordinator.GetIntVecReply) error

GetIntVec returns the global interest vector

func (*Server) GetLayout

func (s *Server) GetLayout(args *coordinator.GetLayoutArgs, reply *coordinator.GetLayoutReply) error

GetLayout returns the layout for a shard

func (*Server) NotifySnapshot

func (s *Server) NotifySnapshot(force bool) bool

NotifySnapshot notifies the current cuckoo layout out If `force` is false, ignore when under a threshold Returns: true if snapshot was built, false if ignored

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL