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 { adminRpc.AdminClient // transport for admin client. we can just expose this, since we don't need to wrap it with any logic // contains filtered or unexported fields }
AdminClient is a client for the Kwil admin service. It inherits both the admin and tx services.
func NewClient ¶
func NewClient(ctx context.Context, target string, opts ...AdminClientOpt) (*AdminClient, error)
NewClient creates a new admin client. It can be configured to either use TLS or not, if using gRPC. The target arg should be either "tcp://localhost:50151", "localhost:50151", or "unix://path/to/socket.sock"
type AdminClientOpt ¶
type AdminClientOpt func(*AdminClient)
func WithLogger ¶
func WithLogger(logger log.Logger) AdminClientOpt
WithLogger sets the logger for the admin client.
func WithTLS ¶
func WithTLS(kwildCertFile, clientKeyFile, clientCertFile string) AdminClientOpt
WithTLS provides the required TLS files for the admin client to connect via gRPC.