grpc

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

package grpc implements a grpc client for the Kwil admin client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcAdminClient

type GrpcAdminClient struct {
	// contains filtered or unexported fields
}

GrpcAdminClient is an grpc client for the Kwil admin service.

func NewAdminClient

func NewAdminClient(conn *grpc.ClientConn) *GrpcAdminClient

NewAdminClient creates a grpc client for the Kwil admin service.

func (*GrpcAdminClient) Approve

func (c *GrpcAdminClient) Approve(ctx context.Context, publicKey []byte) ([]byte, error)

Approve approves a node to join the network. It returns a transaction hash.

func (*GrpcAdminClient) GetConfig

func (c *GrpcAdminClient) GetConfig(ctx context.Context) ([]byte, error)

func (*GrpcAdminClient) Join

func (c *GrpcAdminClient) Join(ctx context.Context) ([]byte, error)

Join sends a node join request to the network from the connected node. It returns a transaction hash.

func (*GrpcAdminClient) JoinStatus

func (c *GrpcAdminClient) JoinStatus(ctx context.Context, pubkey []byte) (*types.JoinRequest, error)

JoinStatus returns the status of a node's join request.

func (*GrpcAdminClient) Leave

func (c *GrpcAdminClient) Leave(ctx context.Context) ([]byte, error)

Leave sends a node leave request to the network from the connected node. It returns a transaction hash.

func (*GrpcAdminClient) ListPendingJoins

func (c *GrpcAdminClient) ListPendingJoins(ctx context.Context) ([]*types.JoinRequest, error)

func (*GrpcAdminClient) ListValidators

func (c *GrpcAdminClient) ListValidators(ctx context.Context) ([]*types.Validator, error)

func (*GrpcAdminClient) Peers

func (*GrpcAdminClient) Remove

func (c *GrpcAdminClient) Remove(ctx context.Context, publicKey []byte) ([]byte, error)

Remove votes to remove a node from the network. It returns a transaction hash.

func (*GrpcAdminClient) Status

func (*GrpcAdminClient) Version

func (c *GrpcAdminClient) Version(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL