Documentation ¶
Index ¶
- type Client
- func (cl *Client) Approve(ctx context.Context, publicKey []byte) ([]byte, error)
- func (cl *Client) GetConfig(ctx context.Context) ([]byte, error)
- func (cl *Client) Join(ctx context.Context) ([]byte, error)
- func (cl *Client) JoinStatus(ctx context.Context, pubkey []byte) (*types.JoinRequest, error)
- func (cl *Client) Leave(ctx context.Context) ([]byte, error)
- func (cl *Client) ListPendingJoins(ctx context.Context) ([]*types.JoinRequest, error)
- func (cl *Client) ListValidators(ctx context.Context) ([]*types.Validator, error)
- func (cl *Client) Peers(ctx context.Context) ([]*adminTypes.PeerInfo, error)
- func (cl *Client) Ping(ctx context.Context) (string, error)
- func (cl *Client) Remove(ctx context.Context, publicKey []byte) ([]byte, error)
- func (cl *Client) Status(ctx context.Context) (*adminTypes.Status, error)
- func (cl *Client) Version(ctx context.Context) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*userClient.Client // expose all user service methods, and CallMethod for admin svc
}
Client is an admin RPC client. It provides all methods of the user RPC service, plus methods that are specific to the admin service.
func NewClient ¶
func NewClient(u *url.URL, opts ...rpcclient.RPCClientOpts) *Client
NewClient constructs a new admin Client.
func WrapUserClient ¶
func WrapUserClient(cl *userClient.Client) *Client
WrapUserClient can be used to construct a new admin Client from an existing user RPC client.
func (*Client) Approve ¶
Approve approves a validator join request for the validator identified by a public key. The transaction hash for the broadcasted approval transaction is returned.
func (*Client) GetConfig ¶
GetConfig gets the current config from the node. It returns the config serialized as JSON.
func (*Client) Join ¶
Join makes a validator join request for the node being administered. The transaction hash for the broadcasted join transaction is returned.
func (*Client) JoinStatus ¶
JoinStatus returns the status of an active join request for the validator identified by the public key.
func (*Client) Leave ¶
Leave makes a validator leave request for the node being administered. The transaction hash for the broadcasted leave transaction is returned.
func (*Client) ListPendingJoins ¶
ListPendingJoins lists all active validator join requests.
func (*Client) ListValidators ¶
ListValidators gets the current validator set.