Documentation ¶
Index ¶
- type ClientEnd
- type Network
- func (rn *Network) AddServer(servername interface{}, rs *Server)
- func (rn *Network) Connect(endname interface{}, servername interface{})
- func (rn *Network) DeleteServer(servername interface{})
- func (rn *Network) Enable(endname interface{}, enabled bool)
- func (rn *Network) GetCount(servername interface{}) int
- func (rn *Network) IsServerDead(endname interface{}, servername interface{}, server *Server) bool
- func (rn *Network) LongDelays(yes bool)
- func (rn *Network) LongReordering(yes bool)
- func (rn *Network) MakeEnd(endname interface{}) *ClientEnd
- func (rn *Network) ProcessReq(req reqMsg)
- func (rn *Network) ReadEndnameInfo(endname interface{}) (enabled bool, servername interface{}, server *Server, reliable bool, ...)
- func (rn *Network) Reliable(yes bool)
- type Server
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func MakeNetwork ¶
func MakeNetwork() *Network
func (*Network) Connect ¶
func (rn *Network) Connect(endname interface{}, servername interface{})
connect a ClientEnd to a server. a ClientEnd can only be connected once in its lifetime.
func (*Network) DeleteServer ¶
func (rn *Network) DeleteServer(servername interface{})
func (*Network) IsServerDead ¶
func (*Network) LongDelays ¶
func (*Network) LongReordering ¶
func (*Network) ProcessReq ¶
func (rn *Network) ProcessReq(req reqMsg)
func (*Network) ReadEndnameInfo ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
a server is a collection of services, all sharing the same rpc dispatcher. so that e.g. both a Raft and a k/v server can listen to the same rpc endpoint.
func MakeServer ¶
func MakeServer() *Server
func (*Server) AddService ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
an object with methods that can be called via RPC. a single server may have more than one Service.
func MakeService ¶
func MakeService(rcvr interface{}) *Service
Click to show internal directories.
Click to hide internal directories.