Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements a RPC server.
func Configure ¶
Configure the RPC server. If addrs is not specified, it defaults on listening on all available addresses on device.
Device is also used by this package for the WireGuard specific queries. Those queries will fail if device is not a WG interface or does not exist. However, this is not a considered an error for Configure. Use addrs if you want the RPC server to listen on different addresses as the WG device.
func (*Server) Close ¶
Close the server now All errors are send to "log" and only the last error is returned.
func (*Server) ListenAndServe ¶
ListenAndServe the RPC servers on all configured addresses. Blocks while there are open listeners.
In case of a error other then http.ErrServerClosed on one of the listeners, all remaining listeners are closed immediatly.
All errors are send to "log" and only the last error is returned.