Documentation ¶
Overview ¶
netrpc package is a transporter client that uses golang's built-in net/rpc package for communication.
Index ¶
- func NewCoordinatorClient() transport.CoordinatorClient
- func NewNodeClient() transport.NodeClient
- type Client
- type ClientWriteArgs
- type CommitArgs
- type CoordinatorBinding
- type CoordinatorClient
- type EmptyArgs
- type EmptyReply
- type NodeBinding
- func (n *NodeBinding) BackPropagate(args *transport.PropagateRequest, reply *transport.PropagateResponse) error
- func (n *NodeBinding) ClientWrite(args *ClientWriteArgs, _ *EmptyReply) error
- func (n *NodeBinding) Commit(args *CommitArgs, _ *EmptyReply) error
- func (n *NodeBinding) FwdPropagate(args *transport.PropagateRequest, reply *transport.PropagateResponse) error
- func (n *NodeBinding) LatestVersion(key string, reply *VersionResponse) error
- func (n *NodeBinding) Ping(_ *EmptyArgs, _ *EmptyReply) error
- func (n *NodeBinding) Read(key string, reply *transport.Item) error
- func (n *NodeBinding) ReadAll(_ *EmptyArgs, reply *[]transport.Item) error
- func (n *NodeBinding) Update(args *transport.NodeMeta, _ *EmptyReply) error
- func (n *NodeBinding) Write(args *WriteArgs, _ *EmptyReply) error
- type NodeClient
- func (nc *NodeClient) BackPropagate(vByK *transport.PropagateRequest) (*transport.PropagateResponse, error)
- func (nc *NodeClient) ClientWrite(key string, value []byte) error
- func (nc *NodeClient) Commit(key string, version uint64) error
- func (nc *NodeClient) FwdPropagate(vByK *transport.PropagateRequest) (*transport.PropagateResponse, error)
- func (nc *NodeClient) LatestVersion(key string) (string, uint64, error)
- func (nc *NodeClient) Ping() error
- func (nc *NodeClient) Read(key string) (string, []byte, error)
- func (nc *NodeClient) ReadAll() (*[]transport.Item, error)
- func (nc *NodeClient) Update(meta *transport.NodeMeta) error
- func (nc *NodeClient) Write(key string, value []byte, version uint64) error
- type VersionResponse
- type WriteArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCoordinatorClient ¶
func NewCoordinatorClient() transport.CoordinatorClient
func NewNodeClient ¶
func NewNodeClient() transport.NodeClient
Types ¶
type ClientWriteArgs ¶
---------------------------------------------------------------------------- net/rpc argument and reply structs
type CommitArgs ¶
---------------------------------------------------------------------------- net/rpc argument and reply structs
type CoordinatorBinding ¶
type CoordinatorBinding struct {
Svc transport.CoordinatorService
}
CoordinatorBinding provides a layer of translation between the CoordinatorService which is transport agnostic and the net/rpc package. This allows using the net/rpc package to invoke CoordinatorService methods.
func (*CoordinatorBinding) AddNode ¶
func (c *CoordinatorBinding) AddNode(addr *string, r *transport.NodeMeta) error
func (*CoordinatorBinding) RemoveNode ¶
func (c *CoordinatorBinding) RemoveNode(addr *string, r *EmptyReply) error
func (*CoordinatorBinding) Write ¶
func (c *CoordinatorBinding) Write(args *ClientWriteArgs, r *EmptyReply) error
type CoordinatorClient ¶
type CoordinatorClient struct {
*Client
}
CoordinatorClient is for invoking net/rpc methods on a Coordinator.
func (*CoordinatorClient) AddNode ¶
func (cc *CoordinatorClient) AddNode(addr string) (*transport.NodeMeta, error)
func (*CoordinatorClient) RemoveNode ¶
func (cc *CoordinatorClient) RemoveNode(addr string) error
type EmptyArgs ¶
type EmptyArgs struct{}
---------------------------------------------------------------------------- net/rpc argument and reply structs
type EmptyReply ¶
type EmptyReply struct{}
---------------------------------------------------------------------------- net/rpc argument and reply structs
type NodeBinding ¶
type NodeBinding struct {
Svc transport.NodeService
}
NodeBinding provides a layer of translation between the NodeService which is transport agnostic and the net/rpc package. This allows using the net/rpc package to invoke NodeService methods.
func (*NodeBinding) BackPropagate ¶
func (n *NodeBinding) BackPropagate( args *transport.PropagateRequest, reply *transport.PropagateResponse, ) error
func (*NodeBinding) ClientWrite ¶
func (n *NodeBinding) ClientWrite(args *ClientWriteArgs, _ *EmptyReply) error
func (*NodeBinding) Commit ¶
func (n *NodeBinding) Commit(args *CommitArgs, _ *EmptyReply) error
func (*NodeBinding) FwdPropagate ¶
func (n *NodeBinding) FwdPropagate( args *transport.PropagateRequest, reply *transport.PropagateResponse, ) error
func (*NodeBinding) LatestVersion ¶
func (n *NodeBinding) LatestVersion(key string, reply *VersionResponse) error
func (*NodeBinding) Ping ¶
func (n *NodeBinding) Ping(_ *EmptyArgs, _ *EmptyReply) error
func (*NodeBinding) ReadAll ¶
func (n *NodeBinding) ReadAll(_ *EmptyArgs, reply *[]transport.Item) error
func (*NodeBinding) Update ¶
func (n *NodeBinding) Update(args *transport.NodeMeta, _ *EmptyReply) error
func (*NodeBinding) Write ¶
func (n *NodeBinding) Write(args *WriteArgs, _ *EmptyReply) error
type NodeClient ¶
type NodeClient struct {
*Client
}
func (*NodeClient) BackPropagate ¶
func (nc *NodeClient) BackPropagate( vByK *transport.PropagateRequest, ) (*transport.PropagateResponse, error)
func (*NodeClient) ClientWrite ¶
func (nc *NodeClient) ClientWrite(key string, value []byte) error
func (*NodeClient) FwdPropagate ¶
func (nc *NodeClient) FwdPropagate( vByK *transport.PropagateRequest, ) (*transport.PropagateResponse, error)
func (*NodeClient) LatestVersion ¶
func (nc *NodeClient) LatestVersion(key string) (string, uint64, error)
func (*NodeClient) Ping ¶
func (nc *NodeClient) Ping() error
type VersionResponse ¶
---------------------------------------------------------------------------- net/rpc argument and reply structs