Documentation ¶
Index ¶
- Variables
- func RegisterRankingServer(s *grpc.Server, srv RankingServer)
- type Bucket
- func (*Bucket) Descriptor() ([]byte, []int)
- func (m *Bucket) GetRemainingDuration() string
- func (m *Bucket) GetVoter() string
- func (m *Bucket) GetVotes() string
- func (m *Bucket) GetWeightedVotes() string
- func (*Bucket) ProtoMessage()
- func (m *Bucket) Reset()
- func (m *Bucket) String() string
- func (m *Bucket) XXX_DiscardUnknown()
- func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Bucket) XXX_Merge(src proto.Message)
- func (m *Bucket) XXX_Size() int
- func (m *Bucket) XXX_Unmarshal(b []byte) error
- type BucketResponse
- func (*BucketResponse) Descriptor() ([]byte, []int)
- func (m *BucketResponse) GetBuckets() []*Bucket
- func (*BucketResponse) ProtoMessage()
- func (m *BucketResponse) Reset()
- func (m *BucketResponse) String() string
- func (m *BucketResponse) XXX_DiscardUnknown()
- func (m *BucketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BucketResponse) XXX_Merge(src proto.Message)
- func (m *BucketResponse) XXX_Size() int
- func (m *BucketResponse) XXX_Unmarshal(b []byte) error
- type Candidate
- func (*Candidate) Descriptor() ([]byte, []int)
- func (m *Candidate) GetAddress() string
- func (m *Candidate) GetName() string
- func (m *Candidate) GetSelfStakingTokens() string
- func (m *Candidate) GetTotalWeightedVotes() string
- func (*Candidate) ProtoMessage()
- func (m *Candidate) Reset()
- func (m *Candidate) String() string
- func (m *Candidate) XXX_DiscardUnknown()
- func (m *Candidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Candidate) XXX_Merge(src proto.Message)
- func (m *Candidate) XXX_Size() int
- func (m *Candidate) XXX_Unmarshal(b []byte) error
- type CandidateResponse
- func (*CandidateResponse) Descriptor() ([]byte, []int)
- func (m *CandidateResponse) GetCandidates() []*Candidate
- func (*CandidateResponse) ProtoMessage()
- func (m *CandidateResponse) Reset()
- func (m *CandidateResponse) String() string
- func (m *CandidateResponse) XXX_DiscardUnknown()
- func (m *CandidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CandidateResponse) XXX_Merge(src proto.Message)
- func (m *CandidateResponse) XXX_Size() int
- func (m *CandidateResponse) XXX_Unmarshal(b []byte) error
- type ChainMeta
- func (*ChainMeta) Descriptor() ([]byte, []int)
- func (m *ChainMeta) GetHeight() string
- func (m *ChainMeta) GetTotalCandidates() uint64
- func (m *ChainMeta) GetTotalVotedStakes() string
- func (m *ChainMeta) GetTotalVotes() string
- func (*ChainMeta) ProtoMessage()
- func (m *ChainMeta) Reset()
- func (m *ChainMeta) String() string
- func (m *ChainMeta) XXX_DiscardUnknown()
- func (m *ChainMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChainMeta) XXX_Merge(src proto.Message)
- func (m *ChainMeta) XXX_Size() int
- func (m *ChainMeta) XXX_Unmarshal(b []byte) error
- type GetBucketsByCandidateRequest
- func (*GetBucketsByCandidateRequest) Descriptor() ([]byte, []int)
- func (m *GetBucketsByCandidateRequest) GetHeight() string
- func (m *GetBucketsByCandidateRequest) GetLimit() uint32
- func (m *GetBucketsByCandidateRequest) GetName() string
- func (m *GetBucketsByCandidateRequest) GetOffset() uint32
- func (*GetBucketsByCandidateRequest) ProtoMessage()
- func (m *GetBucketsByCandidateRequest) Reset()
- func (m *GetBucketsByCandidateRequest) String() string
- func (m *GetBucketsByCandidateRequest) XXX_DiscardUnknown()
- func (m *GetBucketsByCandidateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetBucketsByCandidateRequest) XXX_Merge(src proto.Message)
- func (m *GetBucketsByCandidateRequest) XXX_Size() int
- func (m *GetBucketsByCandidateRequest) XXX_Unmarshal(b []byte) error
- type GetCandidatesRequest
- func (*GetCandidatesRequest) Descriptor() ([]byte, []int)
- func (m *GetCandidatesRequest) GetHeight() string
- func (m *GetCandidatesRequest) GetLimit() uint32
- func (m *GetCandidatesRequest) GetOffset() uint32
- func (*GetCandidatesRequest) ProtoMessage()
- func (m *GetCandidatesRequest) Reset()
- func (m *GetCandidatesRequest) String() string
- func (m *GetCandidatesRequest) XXX_DiscardUnknown()
- func (m *GetCandidatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetCandidatesRequest) XXX_Merge(src proto.Message)
- func (m *GetCandidatesRequest) XXX_Size() int
- func (m *GetCandidatesRequest) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)
- func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_Status
- func (*HealthCheckResponse) ProtoMessage()
- func (m *HealthCheckResponse) Reset()
- func (m *HealthCheckResponse) String() string
- func (m *HealthCheckResponse) XXX_DiscardUnknown()
- func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
- func (m *HealthCheckResponse) XXX_Size() int
- func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse_Status
- type RankingClient
- type RankingServer
Constants ¶
This section is empty.
Variables ¶
View Source
var HealthCheckResponse_Status_name = map[int32]string{
0: "STARTING",
1: "ACTIVE",
2: "INACTIVE",
}
View Source
var HealthCheckResponse_Status_value = map[string]int32{
"STARTING": 0,
"ACTIVE": 1,
"INACTIVE": 2,
}
Functions ¶
func RegisterRankingServer ¶
func RegisterRankingServer(s *grpc.Server, srv RankingServer)
Types ¶
type Bucket ¶
type Bucket struct { // hex string Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` Votes string `protobuf:"bytes,2,opt,name=votes,proto3" json:"votes,omitempty"` WeightedVotes string `protobuf:"bytes,3,opt,name=weightedVotes,proto3" json:"weightedVotes,omitempty"` // human readable duration RemainingDuration string `protobuf:"bytes,4,opt,name=remainingDuration,proto3" json:"remainingDuration,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Bucket) Descriptor ¶
func (*Bucket) GetRemainingDuration ¶
func (*Bucket) GetWeightedVotes ¶
func (*Bucket) ProtoMessage ¶
func (*Bucket) ProtoMessage()
func (*Bucket) XXX_DiscardUnknown ¶
func (m *Bucket) XXX_DiscardUnknown()
func (*Bucket) XXX_Marshal ¶
func (*Bucket) XXX_Unmarshal ¶
type BucketResponse ¶
type BucketResponse struct { Buckets []*Bucket `protobuf:"bytes,1,rep,name=buckets,proto3" json:"buckets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BucketResponse) Descriptor ¶
func (*BucketResponse) Descriptor() ([]byte, []int)
func (*BucketResponse) GetBuckets ¶
func (m *BucketResponse) GetBuckets() []*Bucket
func (*BucketResponse) ProtoMessage ¶
func (*BucketResponse) ProtoMessage()
func (*BucketResponse) Reset ¶
func (m *BucketResponse) Reset()
func (*BucketResponse) String ¶
func (m *BucketResponse) String() string
func (*BucketResponse) XXX_DiscardUnknown ¶
func (m *BucketResponse) XXX_DiscardUnknown()
func (*BucketResponse) XXX_Marshal ¶
func (m *BucketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BucketResponse) XXX_Merge ¶
func (m *BucketResponse) XXX_Merge(src proto.Message)
func (*BucketResponse) XXX_Size ¶
func (m *BucketResponse) XXX_Size() int
func (*BucketResponse) XXX_Unmarshal ¶
func (m *BucketResponse) XXX_Unmarshal(b []byte) error
type Candidate ¶
type Candidate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // hex string Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` TotalWeightedVotes string `protobuf:"bytes,3,opt,name=totalWeightedVotes,proto3" json:"totalWeightedVotes,omitempty"` SelfStakingTokens string `protobuf:"bytes,4,opt,name=SelfStakingTokens,proto3" json:"SelfStakingTokens,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Candidate) Descriptor ¶
func (*Candidate) GetAddress ¶
func (*Candidate) GetSelfStakingTokens ¶
func (*Candidate) GetTotalWeightedVotes ¶
func (*Candidate) ProtoMessage ¶
func (*Candidate) ProtoMessage()
func (*Candidate) XXX_DiscardUnknown ¶
func (m *Candidate) XXX_DiscardUnknown()
func (*Candidate) XXX_Marshal ¶
func (*Candidate) XXX_Unmarshal ¶
type CandidateResponse ¶
type CandidateResponse struct { Candidates []*Candidate `protobuf:"bytes,1,rep,name=candidates,proto3" json:"candidates,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CandidateResponse) Descriptor ¶
func (*CandidateResponse) Descriptor() ([]byte, []int)
func (*CandidateResponse) GetCandidates ¶
func (m *CandidateResponse) GetCandidates() []*Candidate
func (*CandidateResponse) ProtoMessage ¶
func (*CandidateResponse) ProtoMessage()
func (*CandidateResponse) Reset ¶
func (m *CandidateResponse) Reset()
func (*CandidateResponse) String ¶
func (m *CandidateResponse) String() string
func (*CandidateResponse) XXX_DiscardUnknown ¶
func (m *CandidateResponse) XXX_DiscardUnknown()
func (*CandidateResponse) XXX_Marshal ¶
func (m *CandidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CandidateResponse) XXX_Merge ¶
func (m *CandidateResponse) XXX_Merge(src proto.Message)
func (*CandidateResponse) XXX_Size ¶
func (m *CandidateResponse) XXX_Size() int
func (*CandidateResponse) XXX_Unmarshal ¶
func (m *CandidateResponse) XXX_Unmarshal(b []byte) error
type ChainMeta ¶
type ChainMeta struct { Height string `protobuf:"bytes,1,opt,name=height,proto3" json:"height,omitempty"` TotalCandidates uint64 `protobuf:"varint,2,opt,name=totalCandidates,proto3" json:"totalCandidates,omitempty"` TotalVotedStakes string `protobuf:"bytes,3,opt,name=totalVotedStakes,proto3" json:"totalVotedStakes,omitempty"` TotalVotes string `protobuf:"bytes,4,opt,name=totalVotes,proto3" json:"totalVotes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ChainMeta) Descriptor ¶
func (*ChainMeta) GetTotalCandidates ¶
func (*ChainMeta) GetTotalVotedStakes ¶
func (*ChainMeta) GetTotalVotes ¶
func (*ChainMeta) ProtoMessage ¶
func (*ChainMeta) ProtoMessage()
func (*ChainMeta) XXX_DiscardUnknown ¶
func (m *ChainMeta) XXX_DiscardUnknown()
func (*ChainMeta) XXX_Marshal ¶
func (*ChainMeta) XXX_Unmarshal ¶
type GetBucketsByCandidateRequest ¶
type GetBucketsByCandidateRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Height string `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetBucketsByCandidateRequest) Descriptor ¶
func (*GetBucketsByCandidateRequest) Descriptor() ([]byte, []int)
func (*GetBucketsByCandidateRequest) GetHeight ¶
func (m *GetBucketsByCandidateRequest) GetHeight() string
func (*GetBucketsByCandidateRequest) GetLimit ¶
func (m *GetBucketsByCandidateRequest) GetLimit() uint32
func (*GetBucketsByCandidateRequest) GetName ¶
func (m *GetBucketsByCandidateRequest) GetName() string
func (*GetBucketsByCandidateRequest) GetOffset ¶
func (m *GetBucketsByCandidateRequest) GetOffset() uint32
func (*GetBucketsByCandidateRequest) ProtoMessage ¶
func (*GetBucketsByCandidateRequest) ProtoMessage()
func (*GetBucketsByCandidateRequest) Reset ¶
func (m *GetBucketsByCandidateRequest) Reset()
func (*GetBucketsByCandidateRequest) String ¶
func (m *GetBucketsByCandidateRequest) String() string
func (*GetBucketsByCandidateRequest) XXX_DiscardUnknown ¶
func (m *GetBucketsByCandidateRequest) XXX_DiscardUnknown()
func (*GetBucketsByCandidateRequest) XXX_Marshal ¶
func (m *GetBucketsByCandidateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetBucketsByCandidateRequest) XXX_Merge ¶
func (m *GetBucketsByCandidateRequest) XXX_Merge(src proto.Message)
func (*GetBucketsByCandidateRequest) XXX_Size ¶
func (m *GetBucketsByCandidateRequest) XXX_Size() int
func (*GetBucketsByCandidateRequest) XXX_Unmarshal ¶
func (m *GetBucketsByCandidateRequest) XXX_Unmarshal(b []byte) error
type GetCandidatesRequest ¶
type GetCandidatesRequest struct { Height string `protobuf:"bytes,1,opt,name=height,proto3" json:"height,omitempty"` Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetCandidatesRequest) Descriptor ¶
func (*GetCandidatesRequest) Descriptor() ([]byte, []int)
func (*GetCandidatesRequest) GetHeight ¶
func (m *GetCandidatesRequest) GetHeight() string
func (*GetCandidatesRequest) GetLimit ¶
func (m *GetCandidatesRequest) GetLimit() uint32
func (*GetCandidatesRequest) GetOffset ¶
func (m *GetCandidatesRequest) GetOffset() uint32
func (*GetCandidatesRequest) ProtoMessage ¶
func (*GetCandidatesRequest) ProtoMessage()
func (*GetCandidatesRequest) Reset ¶
func (m *GetCandidatesRequest) Reset()
func (*GetCandidatesRequest) String ¶
func (m *GetCandidatesRequest) String() string
func (*GetCandidatesRequest) XXX_DiscardUnknown ¶
func (m *GetCandidatesRequest) XXX_DiscardUnknown()
func (*GetCandidatesRequest) XXX_Marshal ¶
func (m *GetCandidatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetCandidatesRequest) XXX_Merge ¶
func (m *GetCandidatesRequest) XXX_Merge(src proto.Message)
func (*GetCandidatesRequest) XXX_Size ¶
func (m *GetCandidatesRequest) XXX_Size() int
func (*GetCandidatesRequest) XXX_Unmarshal ¶
func (m *GetCandidatesRequest) XXX_Unmarshal(b []byte) error
type HealthCheckResponse ¶ added in v0.1.4
type HealthCheckResponse struct { Status HealthCheckResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ranking.HealthCheckResponse_Status" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckResponse) Descriptor ¶ added in v0.1.4
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) GetStatus ¶ added in v0.1.4
func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_Status
func (*HealthCheckResponse) ProtoMessage ¶ added in v0.1.4
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) Reset ¶ added in v0.1.4
func (m *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶ added in v0.1.4
func (m *HealthCheckResponse) String() string
func (*HealthCheckResponse) XXX_DiscardUnknown ¶ added in v0.1.4
func (m *HealthCheckResponse) XXX_DiscardUnknown()
func (*HealthCheckResponse) XXX_Marshal ¶ added in v0.1.4
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckResponse) XXX_Merge ¶ added in v0.1.4
func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
func (*HealthCheckResponse) XXX_Size ¶ added in v0.1.4
func (m *HealthCheckResponse) XXX_Size() int
func (*HealthCheckResponse) XXX_Unmarshal ¶ added in v0.1.4
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
type HealthCheckResponse_Status ¶ added in v0.1.4
type HealthCheckResponse_Status int32
const ( HealthCheckResponse_STARTING HealthCheckResponse_Status = 0 HealthCheckResponse_ACTIVE HealthCheckResponse_Status = 1 HealthCheckResponse_INACTIVE HealthCheckResponse_Status = 2 )
func (HealthCheckResponse_Status) EnumDescriptor ¶ added in v0.1.4
func (HealthCheckResponse_Status) EnumDescriptor() ([]byte, []int)
func (HealthCheckResponse_Status) String ¶ added in v0.1.4
func (x HealthCheckResponse_Status) String() string
type RankingClient ¶
type RankingClient interface { // get the blockchain meta data GetMeta(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ChainMeta, error) // get candidates GetCandidates(ctx context.Context, in *GetCandidatesRequest, opts ...grpc.CallOption) (*CandidateResponse, error) // get buckets by candidate GetBucketsByCandidate(ctx context.Context, in *GetBucketsByCandidateRequest, opts ...grpc.CallOption) (*BucketResponse, error) // health endpoint IsHealth(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) }
RankingClient is the client API for Ranking service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRankingClient ¶
func NewRankingClient(cc *grpc.ClientConn) RankingClient
type RankingServer ¶
type RankingServer interface { // get the blockchain meta data GetMeta(context.Context, *empty.Empty) (*ChainMeta, error) // get candidates GetCandidates(context.Context, *GetCandidatesRequest) (*CandidateResponse, error) // get buckets by candidate GetBucketsByCandidate(context.Context, *GetBucketsByCandidateRequest) (*BucketResponse, error) // health endpoint IsHealth(context.Context, *empty.Empty) (*HealthCheckResponse, error) }
RankingServer is the server API for Ranking service.
Click to show internal directories.
Click to hide internal directories.