Documentation ¶
Index ¶
- func TestBasic(t *testing.T)
- func TestBenchmark(t *testing.T)
- func TestConcurrentMany(t *testing.T)
- func TestConcurrentOne(t *testing.T)
- func TestCounts(t *testing.T)
- func TestDisconnect(t *testing.T)
- func TestKilled(t *testing.T)
- func TestRegression1(t *testing.T)
- func TestTypes(t *testing.T)
- func TestUnreliable(t *testing.T)
- type ClientEnd
- type JunkArgs
- type JunkReply
- type JunkServer
- type Network
- func (rn *Network) AddServer(servername interface{}, rs *Server)
- func (rn *Network) Cleanup()
- 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) GetTotalCount() 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 ¶
func TestBenchmark ¶
func TestConcurrentMany ¶
test RPCs from concurrent ClientEnds
func TestConcurrentOne ¶
test concurrent RPCs from a single ClientEnd
func TestDisconnect ¶
does net.Enable(endname, false) really disconnect a client?
func TestKilled ¶
if an RPC is stuck in a server, and the server is killed with DeleteServer(), does the RPC get un-stuck?
func TestRegression1 ¶
regression: an RPC that's delayed during Enabled=false should not delay subsequent RPCs (e.g. after Enabled=true).
Types ¶
type JunkServer ¶
type JunkServer struct {
// contains filtered or unexported fields
}
func (*JunkServer) Handler1 ¶
func (js *JunkServer) Handler1(args string, reply *int)
func (*JunkServer) Handler2 ¶
func (js *JunkServer) Handler2(args int, reply *string)
func (*JunkServer) Handler3 ¶
func (js *JunkServer) Handler3(args int, reply *int)
func (*JunkServer) Handler4 ¶
func (js *JunkServer) Handler4(args *JunkArgs, reply *JunkReply)
args is a pointer
func (*JunkServer) Handler5 ¶
func (js *JunkServer) Handler5(args JunkArgs, reply *JunkReply)
args is a not pointer
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) GetTotalCount ¶
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