2018-07-27 22:11:44 +01:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// source: statdb.proto
|
|
|
|
|
|
|
|
package statdb
|
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "golang.org/x/net/context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
|
2018-08-25 02:52:58 +01:00
|
|
|
// Node is info for a updating a single storagenode, used in the Update rpc calls
|
2018-07-27 22:11:44 +01:00
|
|
|
type Node struct {
|
|
|
|
NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
|
|
LatencyList []int64 `protobuf:"varint,2,rep,packed,name=latency_list,json=latencyList,proto3" json:"latency_list,omitempty"`
|
|
|
|
AuditSuccess bool `protobuf:"varint,3,opt,name=audit_success,json=auditSuccess,proto3" json:"audit_success,omitempty"`
|
|
|
|
IsUp bool `protobuf:"varint,4,opt,name=is_up,json=isUp,proto3" json:"is_up,omitempty"`
|
|
|
|
UpdateLatency bool `protobuf:"varint,5,opt,name=update_latency,json=updateLatency,proto3" json:"update_latency,omitempty"`
|
|
|
|
UpdateAuditSuccess bool `protobuf:"varint,6,opt,name=update_audit_success,json=updateAuditSuccess,proto3" json:"update_audit_success,omitempty"`
|
|
|
|
UpdateUptime bool `protobuf:"varint,7,opt,name=update_uptime,json=updateUptime,proto3" json:"update_uptime,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) Reset() { *m = Node{} }
|
|
|
|
func (m *Node) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Node) ProtoMessage() {}
|
|
|
|
func (*Node) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{0}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *Node) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Node.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Node.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *Node) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Node.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *Node) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Node.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Node) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Node.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Node proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Node) GetNodeId() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.NodeId
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetLatencyList() []int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.LatencyList
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetAuditSuccess() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.AuditSuccess
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetIsUp() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.IsUp
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetUpdateLatency() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.UpdateLatency
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetUpdateAuditSuccess() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.UpdateAuditSuccess
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Node) GetUpdateUptime() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.UpdateUptime
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-08-25 02:52:58 +01:00
|
|
|
// NodeStats is info about a single storagenode stored in the stats db
|
2018-07-27 22:11:44 +01:00
|
|
|
type NodeStats struct {
|
|
|
|
NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
|
|
Latency_90 int64 `protobuf:"varint,2,opt,name=latency_90,json=latency90,proto3" json:"latency_90,omitempty"`
|
|
|
|
AuditSuccessRatio float64 `protobuf:"fixed64,3,opt,name=audit_success_ratio,json=auditSuccessRatio,proto3" json:"audit_success_ratio,omitempty"`
|
|
|
|
UptimeRatio float64 `protobuf:"fixed64,4,opt,name=uptime_ratio,json=uptimeRatio,proto3" json:"uptime_ratio,omitempty"`
|
2018-10-30 17:11:22 +00:00
|
|
|
AuditCount int64 `protobuf:"varint,5,opt,name=audit_count,json=auditCount,proto3" json:"audit_count,omitempty"`
|
2018-07-27 22:11:44 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeStats) Reset() { *m = NodeStats{} }
|
|
|
|
func (m *NodeStats) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*NodeStats) ProtoMessage() {}
|
|
|
|
func (*NodeStats) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{1}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *NodeStats) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_NodeStats.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *NodeStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_NodeStats.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *NodeStats) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_NodeStats.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *NodeStats) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_NodeStats.Size(m)
|
|
|
|
}
|
|
|
|
func (m *NodeStats) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_NodeStats.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_NodeStats proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *NodeStats) GetNodeId() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.NodeId
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeStats) GetLatency_90() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Latency_90
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeStats) GetAuditSuccessRatio() float64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.AuditSuccessRatio
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NodeStats) GetUptimeRatio() float64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.UptimeRatio
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-10-30 17:11:22 +00:00
|
|
|
func (m *NodeStats) GetAuditCount() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.AuditCount
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:11:44 +01:00
|
|
|
// CreateRequest is a request message for the Create rpc call
|
|
|
|
type CreateRequest struct {
|
|
|
|
Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
|
|
|
|
APIKey []byte `protobuf:"bytes,2,opt,name=APIKey,proto3" json:"APIKey,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateRequest) Reset() { *m = CreateRequest{} }
|
|
|
|
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateRequest) ProtoMessage() {}
|
|
|
|
func (*CreateRequest) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{2}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CreateRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CreateRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CreateRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CreateRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CreateRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *CreateRequest) GetNode() *Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.Node
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateRequest) GetAPIKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.APIKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreateResponse is a response message for the Create rpc call
|
|
|
|
type CreateResponse struct {
|
|
|
|
Stats *NodeStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateResponse) Reset() { *m = CreateResponse{} }
|
|
|
|
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateResponse) ProtoMessage() {}
|
|
|
|
func (*CreateResponse) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{3}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CreateResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CreateResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CreateResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CreateResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CreateResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CreateResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *CreateResponse) GetStats() *NodeStats {
|
|
|
|
if m != nil {
|
|
|
|
return m.Stats
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetRequest is a request message for the Get rpc call
|
|
|
|
type GetRequest struct {
|
|
|
|
NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
|
|
APIKey []byte `protobuf:"bytes,2,opt,name=APIKey,proto3" json:"APIKey,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GetRequest) Reset() { *m = GetRequest{} }
|
|
|
|
func (m *GetRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*GetRequest) ProtoMessage() {}
|
|
|
|
func (*GetRequest) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{4}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *GetRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_GetRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *GetRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_GetRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *GetRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_GetRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *GetRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_GetRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *GetRequest) GetNodeId() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.NodeId
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GetRequest) GetAPIKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.APIKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetResponse is a response message for the Get rpc call
|
|
|
|
type GetResponse struct {
|
|
|
|
Stats *NodeStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GetResponse) Reset() { *m = GetResponse{} }
|
|
|
|
func (m *GetResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*GetResponse) ProtoMessage() {}
|
|
|
|
func (*GetResponse) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{5}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *GetResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_GetResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *GetResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_GetResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *GetResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_GetResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *GetResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_GetResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *GetResponse) GetStats() *NodeStats {
|
|
|
|
if m != nil {
|
|
|
|
return m.Stats
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-30 17:11:22 +00:00
|
|
|
// FindValidNodesRequest is a request message for the FindValidNodes rpc call
|
|
|
|
type FindValidNodesRequest struct {
|
|
|
|
NodeIds [][]byte `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"`
|
|
|
|
MinStats *NodeStats `protobuf:"bytes,2,opt,name=min_stats,json=minStats,proto3" json:"min_stats,omitempty"`
|
|
|
|
APIKey []byte `protobuf:"bytes,3,opt,name=APIKey,proto3" json:"APIKey,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindValidNodesRequest) Reset() { *m = FindValidNodesRequest{} }
|
|
|
|
func (m *FindValidNodesRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FindValidNodesRequest) ProtoMessage() {}
|
|
|
|
func (*FindValidNodesRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{6}
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FindValidNodesRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FindValidNodesRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *FindValidNodesRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FindValidNodesRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FindValidNodesRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FindValidNodesRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_FindValidNodesRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *FindValidNodesRequest) GetNodeIds() [][]byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.NodeIds
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindValidNodesRequest) GetMinStats() *NodeStats {
|
|
|
|
if m != nil {
|
|
|
|
return m.MinStats
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindValidNodesRequest) GetAPIKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.APIKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// FindValidNodesResponse is a response message for the FindValidNodes rpc call
|
|
|
|
type FindValidNodesResponse struct {
|
|
|
|
PassedIds [][]byte `protobuf:"bytes,1,rep,name=passed_ids,json=passedIds,proto3" json:"passed_ids,omitempty"`
|
|
|
|
FailedIds [][]byte `protobuf:"bytes,2,rep,name=failed_ids,json=failedIds,proto3" json:"failed_ids,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindValidNodesResponse) Reset() { *m = FindValidNodesResponse{} }
|
|
|
|
func (m *FindValidNodesResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FindValidNodesResponse) ProtoMessage() {}
|
|
|
|
func (*FindValidNodesResponse) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{7}
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FindValidNodesResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FindValidNodesResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *FindValidNodesResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FindValidNodesResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FindValidNodesResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FindValidNodesResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FindValidNodesResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_FindValidNodesResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *FindValidNodesResponse) GetPassedIds() [][]byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.PassedIds
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FindValidNodesResponse) GetFailedIds() [][]byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.FailedIds
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:11:44 +01:00
|
|
|
// UpdateRequest is a request message for the Update rpc call
|
|
|
|
type UpdateRequest struct {
|
|
|
|
Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
|
|
|
|
APIKey []byte `protobuf:"bytes,2,opt,name=APIKey,proto3" json:"APIKey,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateRequest) Reset() { *m = UpdateRequest{} }
|
|
|
|
func (m *UpdateRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdateRequest) ProtoMessage() {}
|
|
|
|
func (*UpdateRequest) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{8}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_UpdateRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_UpdateRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *UpdateRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_UpdateRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_UpdateRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_UpdateRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_UpdateRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *UpdateRequest) GetNode() *Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.Node
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateRequest) GetAPIKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.APIKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// UpdateRequest is a response message for the Update rpc call
|
|
|
|
type UpdateResponse struct {
|
|
|
|
Stats *NodeStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateResponse) Reset() { *m = UpdateResponse{} }
|
|
|
|
func (m *UpdateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdateResponse) ProtoMessage() {}
|
|
|
|
func (*UpdateResponse) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{9}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_UpdateResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_UpdateResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *UpdateResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_UpdateResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_UpdateResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_UpdateResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_UpdateResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *UpdateResponse) GetStats() *NodeStats {
|
|
|
|
if m != nil {
|
|
|
|
return m.Stats
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// UpdateBatchRequest is a request message for the UpdateBatch rpc call
|
|
|
|
type UpdateBatchRequest struct {
|
|
|
|
NodeList []*Node `protobuf:"bytes,1,rep,name=node_list,json=nodeList,proto3" json:"node_list,omitempty"`
|
|
|
|
APIKey []byte `protobuf:"bytes,2,opt,name=APIKey,proto3" json:"APIKey,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateBatchRequest) Reset() { *m = UpdateBatchRequest{} }
|
|
|
|
func (m *UpdateBatchRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdateBatchRequest) ProtoMessage() {}
|
|
|
|
func (*UpdateBatchRequest) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{10}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *UpdateBatchRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_UpdateBatchRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *UpdateBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_UpdateBatchRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *UpdateBatchRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_UpdateBatchRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *UpdateBatchRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_UpdateBatchRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *UpdateBatchRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_UpdateBatchRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_UpdateBatchRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *UpdateBatchRequest) GetNodeList() []*Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.NodeList
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateBatchRequest) GetAPIKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.APIKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// UpdateBatchResponse is a response message for the UpdateBatch rpc call
|
|
|
|
type UpdateBatchResponse struct {
|
|
|
|
StatsList []*NodeStats `protobuf:"bytes,1,rep,name=stats_list,json=statsList,proto3" json:"stats_list,omitempty"`
|
2018-10-16 18:40:34 +01:00
|
|
|
FailedNodes []*Node `protobuf:"bytes,2,rep,name=failed_nodes,json=failedNodes,proto3" json:"failed_nodes,omitempty"`
|
2018-07-27 22:11:44 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateBatchResponse) Reset() { *m = UpdateBatchResponse{} }
|
|
|
|
func (m *UpdateBatchResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdateBatchResponse) ProtoMessage() {}
|
|
|
|
func (*UpdateBatchResponse) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{11}
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
func (m *UpdateBatchResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_UpdateBatchResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *UpdateBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_UpdateBatchResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *UpdateBatchResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_UpdateBatchResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *UpdateBatchResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_UpdateBatchResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *UpdateBatchResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_UpdateBatchResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_UpdateBatchResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *UpdateBatchResponse) GetStatsList() []*NodeStats {
|
|
|
|
if m != nil {
|
|
|
|
return m.StatsList
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-16 18:40:34 +01:00
|
|
|
func (m *UpdateBatchResponse) GetFailedNodes() []*Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.FailedNodes
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreateEntryIfNotExistsRequest is a request message for the CreateEntryIfNotExists rpc call
|
|
|
|
type CreateEntryIfNotExistsRequest struct {
|
|
|
|
Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
|
|
|
|
APIKey []byte `protobuf:"bytes,2,opt,name=APIKey,proto3" json:"APIKey,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) Reset() { *m = CreateEntryIfNotExistsRequest{} }
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateEntryIfNotExistsRequest) ProtoMessage() {}
|
|
|
|
func (*CreateEntryIfNotExistsRequest) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{12}
|
2018-10-16 18:40:34 +01:00
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CreateEntryIfNotExistsRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CreateEntryIfNotExistsRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CreateEntryIfNotExistsRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CreateEntryIfNotExistsRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CreateEntryIfNotExistsRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CreateEntryIfNotExistsRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateEntryIfNotExistsRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) GetNode() *Node {
|
|
|
|
if m != nil {
|
|
|
|
return m.Node
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateEntryIfNotExistsRequest) GetAPIKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.APIKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreateEntryIfNotExistsResponse is a response message for the CreateEntryIfNotExists rpc call
|
|
|
|
type CreateEntryIfNotExistsResponse struct {
|
|
|
|
Stats *NodeStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CreateEntryIfNotExistsResponse) Reset() { *m = CreateEntryIfNotExistsResponse{} }
|
|
|
|
func (m *CreateEntryIfNotExistsResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateEntryIfNotExistsResponse) ProtoMessage() {}
|
|
|
|
func (*CreateEntryIfNotExistsResponse) Descriptor() ([]byte, []int) {
|
2018-10-30 17:11:22 +00:00
|
|
|
return fileDescriptor_statdb_5a3c71d6f7d0333f, []int{13}
|
2018-10-16 18:40:34 +01:00
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CreateEntryIfNotExistsResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CreateEntryIfNotExistsResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CreateEntryIfNotExistsResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CreateEntryIfNotExistsResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CreateEntryIfNotExistsResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CreateEntryIfNotExistsResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CreateEntryIfNotExistsResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateEntryIfNotExistsResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *CreateEntryIfNotExistsResponse) GetStats() *NodeStats {
|
|
|
|
if m != nil {
|
|
|
|
return m.Stats
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:11:44 +01:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Node)(nil), "statdb.Node")
|
|
|
|
proto.RegisterType((*NodeStats)(nil), "statdb.NodeStats")
|
|
|
|
proto.RegisterType((*CreateRequest)(nil), "statdb.CreateRequest")
|
|
|
|
proto.RegisterType((*CreateResponse)(nil), "statdb.CreateResponse")
|
|
|
|
proto.RegisterType((*GetRequest)(nil), "statdb.GetRequest")
|
|
|
|
proto.RegisterType((*GetResponse)(nil), "statdb.GetResponse")
|
2018-10-30 17:11:22 +00:00
|
|
|
proto.RegisterType((*FindValidNodesRequest)(nil), "statdb.FindValidNodesRequest")
|
|
|
|
proto.RegisterType((*FindValidNodesResponse)(nil), "statdb.FindValidNodesResponse")
|
2018-07-27 22:11:44 +01:00
|
|
|
proto.RegisterType((*UpdateRequest)(nil), "statdb.UpdateRequest")
|
|
|
|
proto.RegisterType((*UpdateResponse)(nil), "statdb.UpdateResponse")
|
|
|
|
proto.RegisterType((*UpdateBatchRequest)(nil), "statdb.UpdateBatchRequest")
|
|
|
|
proto.RegisterType((*UpdateBatchResponse)(nil), "statdb.UpdateBatchResponse")
|
2018-10-16 18:40:34 +01:00
|
|
|
proto.RegisterType((*CreateEntryIfNotExistsRequest)(nil), "statdb.CreateEntryIfNotExistsRequest")
|
|
|
|
proto.RegisterType((*CreateEntryIfNotExistsResponse)(nil), "statdb.CreateEntryIfNotExistsResponse")
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
|
|
|
// StatDBClient is the client API for StatDB service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type StatDBClient interface {
|
2018-08-25 02:52:58 +01:00
|
|
|
// Create a db entry for the provided storagenode ID
|
2018-07-27 22:11:44 +01:00
|
|
|
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
|
2018-08-25 02:52:58 +01:00
|
|
|
// Get uses a storagenode ID to get that storagenode's stats
|
2018-07-27 22:11:44 +01:00
|
|
|
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
|
2018-10-30 17:11:22 +00:00
|
|
|
// FindValidNodes gets a subset of storagenodes that fit minimum reputation args
|
|
|
|
FindValidNodes(ctx context.Context, in *FindValidNodesRequest, opts ...grpc.CallOption) (*FindValidNodesResponse, error)
|
2018-08-25 02:52:58 +01:00
|
|
|
// Update updates storagenode stats for a single storagenode
|
2018-07-27 22:11:44 +01:00
|
|
|
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
|
2018-08-25 02:52:58 +01:00
|
|
|
// UpdateBatch updates storagenode stats for multiple farmers at a time
|
2018-07-27 22:11:44 +01:00
|
|
|
UpdateBatch(ctx context.Context, in *UpdateBatchRequest, opts ...grpc.CallOption) (*UpdateBatchResponse, error)
|
2018-10-16 18:40:34 +01:00
|
|
|
// CreateEntryIfNotExists creates a db entry if it didn't exist
|
|
|
|
CreateEntryIfNotExists(ctx context.Context, in *CreateEntryIfNotExistsRequest, opts ...grpc.CallOption) (*CreateEntryIfNotExistsResponse, error)
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type statDBClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewStatDBClient(cc *grpc.ClientConn) StatDBClient {
|
|
|
|
return &statDBClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *statDBClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
|
|
|
|
out := new(CreateResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/statdb.StatDB/Create", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *statDBClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
|
|
|
|
out := new(GetResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/statdb.StatDB/Get", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-10-30 17:11:22 +00:00
|
|
|
func (c *statDBClient) FindValidNodes(ctx context.Context, in *FindValidNodesRequest, opts ...grpc.CallOption) (*FindValidNodesResponse, error) {
|
|
|
|
out := new(FindValidNodesResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/statdb.StatDB/FindValidNodes", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:11:44 +01:00
|
|
|
func (c *statDBClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) {
|
|
|
|
out := new(UpdateResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/statdb.StatDB/Update", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *statDBClient) UpdateBatch(ctx context.Context, in *UpdateBatchRequest, opts ...grpc.CallOption) (*UpdateBatchResponse, error) {
|
|
|
|
out := new(UpdateBatchResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/statdb.StatDB/UpdateBatch", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-10-16 18:40:34 +01:00
|
|
|
func (c *statDBClient) CreateEntryIfNotExists(ctx context.Context, in *CreateEntryIfNotExistsRequest, opts ...grpc.CallOption) (*CreateEntryIfNotExistsResponse, error) {
|
|
|
|
out := new(CreateEntryIfNotExistsResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/statdb.StatDB/CreateEntryIfNotExists", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:11:44 +01:00
|
|
|
// StatDBServer is the server API for StatDB service.
|
|
|
|
type StatDBServer interface {
|
2018-08-25 02:52:58 +01:00
|
|
|
// Create a db entry for the provided storagenode ID
|
2018-07-27 22:11:44 +01:00
|
|
|
Create(context.Context, *CreateRequest) (*CreateResponse, error)
|
2018-08-25 02:52:58 +01:00
|
|
|
// Get uses a storagenode ID to get that storagenode's stats
|
2018-07-27 22:11:44 +01:00
|
|
|
Get(context.Context, *GetRequest) (*GetResponse, error)
|
2018-10-30 17:11:22 +00:00
|
|
|
// FindValidNodes gets a subset of storagenodes that fit minimum reputation args
|
|
|
|
FindValidNodes(context.Context, *FindValidNodesRequest) (*FindValidNodesResponse, error)
|
2018-08-25 02:52:58 +01:00
|
|
|
// Update updates storagenode stats for a single storagenode
|
2018-07-27 22:11:44 +01:00
|
|
|
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
|
2018-08-25 02:52:58 +01:00
|
|
|
// UpdateBatch updates storagenode stats for multiple farmers at a time
|
2018-07-27 22:11:44 +01:00
|
|
|
UpdateBatch(context.Context, *UpdateBatchRequest) (*UpdateBatchResponse, error)
|
2018-10-16 18:40:34 +01:00
|
|
|
// CreateEntryIfNotExists creates a db entry if it didn't exist
|
|
|
|
CreateEntryIfNotExists(context.Context, *CreateEntryIfNotExistsRequest) (*CreateEntryIfNotExistsResponse, error)
|
2018-07-27 22:11:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterStatDBServer(s *grpc.Server, srv StatDBServer) {
|
|
|
|
s.RegisterService(&_StatDB_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _StatDB_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(CreateRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(StatDBServer).Create(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/statdb.StatDB/Create",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(StatDBServer).Create(ctx, req.(*CreateRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _StatDB_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(GetRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(StatDBServer).Get(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/statdb.StatDB/Get",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(StatDBServer).Get(ctx, req.(*GetRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-10-30 17:11:22 +00:00
|
|
|
func _StatDB_FindValidNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(FindValidNodesRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(StatDBServer).FindValidNodes(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/statdb.StatDB/FindValidNodes",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(StatDBServer).FindValidNodes(ctx, req.(*FindValidNodesRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:11:44 +01:00
|
|
|
func _StatDB_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(UpdateRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(StatDBServer).Update(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/statdb.StatDB/Update",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(StatDBServer).Update(ctx, req.(*UpdateRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _StatDB_UpdateBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(UpdateBatchRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(StatDBServer).UpdateBatch(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/statdb.StatDB/UpdateBatch",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(StatDBServer).UpdateBatch(ctx, req.(*UpdateBatchRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-10-16 18:40:34 +01:00
|
|
|
func _StatDB_CreateEntryIfNotExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(CreateEntryIfNotExistsRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(StatDBServer).CreateEntryIfNotExists(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/statdb.StatDB/CreateEntryIfNotExists",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(StatDBServer).CreateEntryIfNotExists(ctx, req.(*CreateEntryIfNotExistsRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-07-27 22:11:44 +01:00
|
|
|
var _StatDB_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "statdb.StatDB",
|
|
|
|
HandlerType: (*StatDBServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Create",
|
|
|
|
Handler: _StatDB_Create_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "Get",
|
|
|
|
Handler: _StatDB_Get_Handler,
|
|
|
|
},
|
2018-10-30 17:11:22 +00:00
|
|
|
{
|
|
|
|
MethodName: "FindValidNodes",
|
|
|
|
Handler: _StatDB_FindValidNodes_Handler,
|
|
|
|
},
|
2018-07-27 22:11:44 +01:00
|
|
|
{
|
|
|
|
MethodName: "Update",
|
|
|
|
Handler: _StatDB_Update_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "UpdateBatch",
|
|
|
|
Handler: _StatDB_UpdateBatch_Handler,
|
|
|
|
},
|
2018-10-16 18:40:34 +01:00
|
|
|
{
|
|
|
|
MethodName: "CreateEntryIfNotExists",
|
|
|
|
Handler: _StatDB_CreateEntryIfNotExists_Handler,
|
|
|
|
},
|
2018-07-27 22:11:44 +01:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "statdb.proto",
|
|
|
|
}
|
|
|
|
|
2018-10-30 17:11:22 +00:00
|
|
|
func init() { proto.RegisterFile("statdb.proto", fileDescriptor_statdb_5a3c71d6f7d0333f) }
|
|
|
|
|
|
|
|
var fileDescriptor_statdb_5a3c71d6f7d0333f = []byte{
|
|
|
|
// 675 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xc1, 0x6e, 0xd3, 0x40,
|
|
|
|
0x10, 0x95, 0xe3, 0xd4, 0x6d, 0xc6, 0x6e, 0xa5, 0x6e, 0x68, 0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