Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func FileExists ¶
FileExists reports whether the named file or directory exists.
func ParseListeners ¶
ParseListeners splits the list of listen addresses passed in addrs into IPv4 and IPv6 slices and returns them. This allows easy creation of the listeners on the correct interface "tcp4" and "tcp6". It also properly detects addresses which apply to "all interfaces" and adds the address to both slices.
Types ¶
type Config ¶
type Config struct { DisableTLS bool Key string Cert string User string Pass string LimitUser string LimitPass string MaxClients uint32 Listeners []string }
Config provides configuration parameters of the rpc server.
type Server ¶
Server holds the items the rpc server may need to access (config, shutdown, main server, etc.)
func NewRPCServer ¶
NewRPCServer returns a new instance of the Server struct.
func (*Server) RestrictAdmin ¶
RestrictAdmin restricts access of the client, returning an error if the client is not already authenticated as an admin.
func (*Server) RestrictAuth ¶
RestrictAuth restricts access of the client, returning an error if the client is not already authenticated.