Documentation ¶
Overview ¶
package grpc implements a grpc client for the Kwil admin client.
Index ¶
- type GrpcAdminClient
- func (c *GrpcAdminClient) Approve(ctx context.Context, publicKey []byte) ([]byte, error)
- func (c *GrpcAdminClient) GetConfig(ctx context.Context) ([]byte, error)
- func (c *GrpcAdminClient) Join(ctx context.Context) ([]byte, error)
- func (c *GrpcAdminClient) JoinStatus(ctx context.Context, pubkey []byte) (*types.JoinRequest, error)
- func (c *GrpcAdminClient) Leave(ctx context.Context) ([]byte, error)
- func (c *GrpcAdminClient) ListPendingJoins(ctx context.Context) ([]*types.JoinRequest, error)
- func (c *GrpcAdminClient) ListValidators(ctx context.Context) ([]*types.Validator, error)
- func (c *GrpcAdminClient) Peers(ctx context.Context) ([]*adminTypes.PeerInfo, error)
- func (c *GrpcAdminClient) Remove(ctx context.Context, publicKey []byte) ([]byte, error)
- func (c *GrpcAdminClient) Status(ctx context.Context) (*adminTypes.Status, error)
- func (c *GrpcAdminClient) Version(ctx context.Context) (string, error)
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 ¶
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 (*GrpcAdminClient) Peers ¶
func (c *GrpcAdminClient) Peers(ctx context.Context) ([]*adminTypes.PeerInfo, error)
func (*GrpcAdminClient) Remove ¶
Remove votes to remove a node from the network. It returns a transaction hash.
func (*GrpcAdminClient) Status ¶
func (c *GrpcAdminClient) Status(ctx context.Context) (*adminTypes.Status, error)
Click to show internal directories.
Click to hide internal directories.