Documentation
¶
Overview ¶
Package rpc provides a client for making remote procedure calls (RPC) to a server. It allows clients to connect to a server and invoke methods on the server using RPC. The client can be used to change the log level of the server or perform other commands. It uses the net/rpc package to handle the RPC communication and provides a simple interface for clients to interact with the server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct that represents an RPC client. It contains an RPC client that can be used to make remote procedure calls to a server.
func NewClient ¶
NewClient creates a new RPC client with the specified address. The address is the server's address, and it defaults to the "/rpc" endpoint.
func NewClientWithPath ¶
NewClientWithPath creates a new RPC client with the specified address and path. The address is the server's address, and the path is the RPC endpoint. If the path is empty, it defaults to "/rpc".
func (*Client) ChangeLogLevel ¶
ChangeLogLevel changes the log level of the server. It takes a context and a log level as parameters. The context is used to control the timeout and cancellation of the request.