Documentation
¶
Index ¶
Constants ¶
View Source
const ( ServerAddrDefault = "127.0.0.1" ServerPortDefault = "4040" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MaintenanceModeArgs ¶
type MaintenanceModeArgs struct {
InMaintenanceMode bool
}
type MaintenanceModeReply ¶
type MaintenanceModeReply struct {
Status string
}
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func NewRPCClient ¶
Creates a new RPC connection to a server and wraps the connection in a custom RPCClient struct. The client is returned ready to use, or an error if connection fails.
func (*RPCClient) Close ¶
Closes the underlying RPC connection using a clean shutdown pattern. Any errors duing the close are passed through from the underlying close operation.
func (*RPCClient) SetMaintenanceMode ¶
Convenience wrapper method that makes RPC calls easier and more user-friendly— the the method is used to put the server in or out of maintance mode. Example usage:
status, err := client.SetMaintenanceMode(true) // Put in maintenance status, err := client.SetMaintenanceMode(false) // Take out of maintenance
type RPCServer ¶
Server
func (*RPCServer) SetMaintenanceMode ¶
func (r *RPCServer) SetMaintenanceMode(args *MaintenanceModeArgs, reply *MaintenanceModeReply) error
Click to show internal directories.
Click to hide internal directories.