Documentation ¶
Overview ¶
package adminclient provides a client for the Kwil admin service. The admin service is used to perform node administrative actions, such as submitting validator transactions, retrieving node status, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminClient ¶
type AdminClient struct {
// contains filtered or unexported fields
}
AdminClient is a client for the Kwil admin service. It inherits both the admin and tx services.
func NewClient ¶
NewClient creates a new admin client . The target arg is usually either "127.0.0.1:8485" or "/path/to/socket.socket". The scheme http:// or https:// may be included, to dictate if TLS is required or not. If no scheme is given, http:// is assumed. UNIX socket transport may not use TLS. The endpoint path is a separate argument to distinguish it from the UNIX socket file path.
For example,
adminclient.NewClient(ctx, "/run/kwild.sock")
type Opt ¶ added in v0.2.0
type Opt func(*AdminClient)
func WithLogger ¶
WithLogger sets the logger for the admin client.
func WithPass ¶ added in v0.3.0
WithPass specifies a password to use, if password authentication is enable on the server.
func WithTLS ¶
WithTLS provides the required files for the admin client to use TLS, and possibly client authenticated TLS. kwildCertFile may be omitted if the service is issued a TLS certificate by a root CA. The client files may be omitted if not using TLS for client authentication, only for transport encryption and server authentication. The server must be configured appropriately.