Documentation
¶
Index ¶
- func NewClient(client validatorstatepb.ValidatorStateClient) validators.State
- type Client
- func (c *Client) GetCurrentHeight(ctx context.Context) (uint64, error)
- func (c *Client) GetCurrentValidators(ctx context.Context, height uint64, netID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error)
- func (c *Client) GetValidatorSet(ctx context.Context, height uint64, netID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error)
- func (c *Client) GetWarpValidatorSet(ctx context.Context, height uint64, netID ids.ID) (*validators.WarpSet, error)
- func (c *Client) GetWarpValidatorSets(ctx context.Context, heights []uint64, netIDs []ids.ID) (map[ids.ID]map[uint64]*validators.WarpSet, error)
- type Server
- func (s *Server) GetCurrentHeight(ctx context.Context, _ *emptypb.Empty) (*pb.GetCurrentHeightResponse, error)
- func (s *Server) GetCurrentValidatorSet(ctx context.Context, req *pb.GetCurrentValidatorSetRequest) (*pb.GetCurrentValidatorSetResponse, error)
- func (s *Server) GetMinimumHeight(ctx context.Context, _ *emptypb.Empty) (*pb.GetMinimumHeightResponse, error)
- func (s *Server) GetNetID(ctx context.Context, req *pb.GetNetIDRequest) (*pb.GetNetIDResponse, error)
- func (s *Server) GetValidatorSet(ctx context.Context, req *pb.GetValidatorSetRequest) (*pb.GetValidatorSetResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(client validatorstatepb.ValidatorStateClient) validators.State
NewClient creates a new validator state client
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a ValidatorState client
func (*Client) GetCurrentHeight ¶
func (*Client) GetCurrentValidators ¶ added in v1.16.56
func (*Client) GetValidatorSet ¶
func (*Client) GetWarpValidatorSet ¶ added in v1.16.56
type Server ¶
type Server struct {
pb.UnsafeValidatorStateServer
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(state validators.State) *Server
func (*Server) GetCurrentHeight ¶
func (*Server) GetCurrentValidatorSet ¶
func (s *Server) GetCurrentValidatorSet(ctx context.Context, req *pb.GetCurrentValidatorSetRequest) (*pb.GetCurrentValidatorSetResponse, error)
func (*Server) GetMinimumHeight ¶
func (*Server) GetNetID ¶ added in v1.16.56
func (s *Server) GetNetID(ctx context.Context, req *pb.GetNetIDRequest) (*pb.GetNetIDResponse, error)
func (*Server) GetValidatorSet ¶
func (s *Server) GetValidatorSet(ctx context.Context, req *pb.GetValidatorSetRequest) (*pb.GetValidatorSetResponse, error)
Click to show internal directories.
Click to hide internal directories.