Documentation
¶
Overview ¶
Package `rpc` exports methods to interface with an RPC server.
This separation allows RPC clients to not require importing the `server` package, which makes them a lot lighter.
The "Impl" variables are to be used by the server for the internal implementations of each RPC opeartion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAuthArgs ¶
Arguments for the AddAuth operation.
type Implementation ¶
type Implementation interface {
AddAuth(args *AddAuthArgs, reply *int) error
RmAuth(args *RmAuthArgs, reply *int) error
}
The interface RPC servers must implement.
type Server ¶
Wraps the HTTP server generated by the implementation.
func NewServer ¶
func NewServer(impl Implementation, port int) (*Server, error)
Returns an HTTP server that serves RPC in the passed port. The "Impl" variables should be used to configure its operations before running the server. If there is an issue setting up the server, returns an error.