|
|
|
@ -1,16 +1,14 @@
|
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
|
|
|
// source: inspector.proto
|
|
|
|
|
|
|
|
|
|
package pb
|
|
|
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
|
|
|
import fmt "fmt"
|
|
|
|
|
import math "math"
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
context "golang.org/x/net/context"
|
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
|
)
|
|
|
|
|
import context "golang.org/x/net/context"
|
|
|
|
|
import grpc "google.golang.org/grpc"
|
|
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
|
var _ = proto.Marshal
|
|
|
|
@ -21,7 +19,201 @@ var _ = math.Inf
|
|
|
|
|
// 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
|
|
|
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
|
|
|
|
|
|
// GetStats
|
|
|
|
|
type GetStatsRequest struct {
|
|
|
|
|
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *GetStatsRequest) Reset() { *m = GetStatsRequest{} }
|
|
|
|
|
func (m *GetStatsRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*GetStatsRequest) ProtoMessage() {}
|
|
|
|
|
func (*GetStatsRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{0}
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_GetStatsRequest.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_GetStatsRequest.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (dst *GetStatsRequest) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_GetStatsRequest.Merge(dst, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsRequest) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_GetStatsRequest.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsRequest) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_GetStatsRequest.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetStatsRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *GetStatsRequest) GetNodeId() string {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.NodeId
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetStatsResponse struct {
|
|
|
|
|
AuditCount int64 `protobuf:"varint,1,opt,name=audit_count,json=auditCount,proto3" json:"audit_count,omitempty"`
|
|
|
|
|
UptimeRatio float64 `protobuf:"fixed64,2,opt,name=uptime_ratio,json=uptimeRatio,proto3" json:"uptime_ratio,omitempty"`
|
|
|
|
|
AuditRatio float64 `protobuf:"fixed64,3,opt,name=audit_ratio,json=auditRatio,proto3" json:"audit_ratio,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *GetStatsResponse) Reset() { *m = GetStatsResponse{} }
|
|
|
|
|
func (m *GetStatsResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*GetStatsResponse) ProtoMessage() {}
|
|
|
|
|
func (*GetStatsResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{1}
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_GetStatsResponse.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_GetStatsResponse.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (dst *GetStatsResponse) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_GetStatsResponse.Merge(dst, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsResponse) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_GetStatsResponse.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetStatsResponse) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_GetStatsResponse.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetStatsResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *GetStatsResponse) GetAuditCount() int64 {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.AuditCount
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *GetStatsResponse) GetUptimeRatio() float64 {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.UptimeRatio
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *GetStatsResponse) GetAuditRatio() float64 {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.AuditRatio
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CreateStats
|
|
|
|
|
type CreateStatsRequest struct {
|
|
|
|
|
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
|
|
|
|
|
AuditCount int64 `protobuf:"varint,2,opt,name=audit_count,json=auditCount,proto3" json:"audit_count,omitempty"`
|
|
|
|
|
AuditSuccessCount int64 `protobuf:"varint,3,opt,name=audit_success_count,json=auditSuccessCount,proto3" json:"audit_success_count,omitempty"`
|
|
|
|
|
UptimeCount int64 `protobuf:"varint,4,opt,name=uptime_count,json=uptimeCount,proto3" json:"uptime_count,omitempty"`
|
|
|
|
|
UptimeSuccessCount int64 `protobuf:"varint,5,opt,name=uptime_success_count,json=uptimeSuccessCount,proto3" json:"uptime_success_count,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CreateStatsRequest) Reset() { *m = CreateStatsRequest{} }
|
|
|
|
|
func (m *CreateStatsRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*CreateStatsRequest) ProtoMessage() {}
|
|
|
|
|
func (*CreateStatsRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{2}
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_CreateStatsRequest.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_CreateStatsRequest.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (dst *CreateStatsRequest) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_CreateStatsRequest.Merge(dst, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsRequest) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_CreateStatsRequest.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsRequest) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_CreateStatsRequest.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateStatsRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *CreateStatsRequest) GetNodeId() string {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.NodeId
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CreateStatsRequest) GetAuditCount() int64 {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.AuditCount
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CreateStatsRequest) GetAuditSuccessCount() int64 {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.AuditSuccessCount
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CreateStatsRequest) GetUptimeCount() int64 {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.UptimeCount
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CreateStatsRequest) GetUptimeSuccessCount() int64 {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.UptimeSuccessCount
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CreateStatsResponse struct {
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CreateStatsResponse) Reset() { *m = CreateStatsResponse{} }
|
|
|
|
|
func (m *CreateStatsResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*CreateStatsResponse) ProtoMessage() {}
|
|
|
|
|
func (*CreateStatsResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{3}
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_CreateStatsResponse.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_CreateStatsResponse.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (dst *CreateStatsResponse) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_CreateStatsResponse.Merge(dst, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsResponse) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_CreateStatsResponse.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *CreateStatsResponse) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_CreateStatsResponse.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateStatsResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
// CountNodes
|
|
|
|
|
type CountNodesResponse struct {
|
|
|
|
@ -36,7 +228,7 @@ func (m *CountNodesResponse) Reset() { *m = CountNodesResponse{} }
|
|
|
|
|
func (m *CountNodesResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*CountNodesResponse) ProtoMessage() {}
|
|
|
|
|
func (*CountNodesResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{0}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{4}
|
|
|
|
|
}
|
|
|
|
|
func (m *CountNodesResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_CountNodesResponse.Unmarshal(m, b)
|
|
|
|
@ -80,7 +272,7 @@ func (m *CountNodesRequest) Reset() { *m = CountNodesRequest{} }
|
|
|
|
|
func (m *CountNodesRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*CountNodesRequest) ProtoMessage() {}
|
|
|
|
|
func (*CountNodesRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{1}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{5}
|
|
|
|
|
}
|
|
|
|
|
func (m *CountNodesRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_CountNodesRequest.Unmarshal(m, b)
|
|
|
|
@ -111,7 +303,7 @@ func (m *GetBucketsRequest) Reset() { *m = GetBucketsRequest{} }
|
|
|
|
|
func (m *GetBucketsRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*GetBucketsRequest) ProtoMessage() {}
|
|
|
|
|
func (*GetBucketsRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{2}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{6}
|
|
|
|
|
}
|
|
|
|
|
func (m *GetBucketsRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_GetBucketsRequest.Unmarshal(m, b)
|
|
|
|
@ -133,7 +325,7 @@ var xxx_messageInfo_GetBucketsRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
type GetBucketsResponse struct {
|
|
|
|
|
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
|
|
|
|
Ids [][]byte `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"`
|
|
|
|
|
Ids [][]byte `protobuf:"bytes,2,rep,name=ids" json:"ids,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
@ -143,7 +335,7 @@ func (m *GetBucketsResponse) Reset() { *m = GetBucketsResponse{} }
|
|
|
|
|
func (m *GetBucketsResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*GetBucketsResponse) ProtoMessage() {}
|
|
|
|
|
func (*GetBucketsResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{3}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{7}
|
|
|
|
|
}
|
|
|
|
|
func (m *GetBucketsResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_GetBucketsResponse.Unmarshal(m, b)
|
|
|
|
@ -189,7 +381,7 @@ func (m *GetBucketRequest) Reset() { *m = GetBucketRequest{} }
|
|
|
|
|
func (m *GetBucketRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*GetBucketRequest) ProtoMessage() {}
|
|
|
|
|
func (*GetBucketRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{4}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{8}
|
|
|
|
|
}
|
|
|
|
|
func (m *GetBucketRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_GetBucketRequest.Unmarshal(m, b)
|
|
|
|
@ -218,7 +410,7 @@ func (m *GetBucketRequest) GetId() string {
|
|
|
|
|
|
|
|
|
|
type GetBucketResponse struct {
|
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
|
Nodes []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
|
|
|
|
|
Nodes []*Node `protobuf:"bytes,2,rep,name=nodes" json:"nodes,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
@ -228,7 +420,7 @@ func (m *GetBucketResponse) Reset() { *m = GetBucketResponse{} }
|
|
|
|
|
func (m *GetBucketResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*GetBucketResponse) ProtoMessage() {}
|
|
|
|
|
func (*GetBucketResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{5}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{9}
|
|
|
|
|
}
|
|
|
|
|
func (m *GetBucketResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_GetBucketResponse.Unmarshal(m, b)
|
|
|
|
@ -263,7 +455,7 @@ func (m *GetBucketResponse) GetNodes() []*Node {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Bucket struct {
|
|
|
|
|
Nodes []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
|
|
|
|
|
Nodes []*Node `protobuf:"bytes,2,rep,name=nodes" json:"nodes,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
@ -273,7 +465,7 @@ func (m *Bucket) Reset() { *m = Bucket{} }
|
|
|
|
|
func (m *Bucket) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Bucket) ProtoMessage() {}
|
|
|
|
|
func (*Bucket) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{6}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{10}
|
|
|
|
|
}
|
|
|
|
|
func (m *Bucket) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_Bucket.Unmarshal(m, b)
|
|
|
|
@ -301,7 +493,7 @@ func (m *Bucket) GetNodes() []*Node {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type BucketList struct {
|
|
|
|
|
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
|
|
|
|
|
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
@ -311,7 +503,7 @@ func (m *BucketList) Reset() { *m = BucketList{} }
|
|
|
|
|
func (m *BucketList) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*BucketList) ProtoMessage() {}
|
|
|
|
|
func (*BucketList) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_inspector_4eafe550bfab534a, []int{7}
|
|
|
|
|
return fileDescriptor_inspector_ed07bb9d3058e441, []int{11}
|
|
|
|
|
}
|
|
|
|
|
func (m *BucketList) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_BucketList.Unmarshal(m, b)
|
|
|
|
@ -339,6 +531,10 @@ func (m *BucketList) GetNodes() []*Node {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
proto.RegisterType((*GetStatsRequest)(nil), "inspector.GetStatsRequest")
|
|
|
|
|
proto.RegisterType((*GetStatsResponse)(nil), "inspector.GetStatsResponse")
|
|
|
|
|
proto.RegisterType((*CreateStatsRequest)(nil), "inspector.CreateStatsRequest")
|
|
|
|
|
proto.RegisterType((*CreateStatsResponse)(nil), "inspector.CreateStatsResponse")
|
|
|
|
|
proto.RegisterType((*CountNodesResponse)(nil), "inspector.CountNodesResponse")
|
|
|
|
|
proto.RegisterType((*CountNodesRequest)(nil), "inspector.CountNodesRequest")
|
|
|
|
|
proto.RegisterType((*GetBucketsRequest)(nil), "inspector.GetBucketsRequest")
|
|
|
|
@ -357,16 +553,21 @@ var _ grpc.ClientConn
|
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
|
|
|
|
|
// InspectorClient is the client API for Inspector service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
// Client API for Inspector service
|
|
|
|
|
|
|
|
|
|
type InspectorClient interface {
|
|
|
|
|
// Kad/Overlay commands:
|
|
|
|
|
// CountNodes returns the number of nodes in the cache and in the routing table
|
|
|
|
|
CountNodes(ctx context.Context, in *CountNodesRequest, opts ...grpc.CallOption) (*CountNodesResponse, error)
|
|
|
|
|
// GetBuckets returns the k buckets from a Kademlia instance
|
|
|
|
|
GetBuckets(ctx context.Context, in *GetBucketsRequest, opts ...grpc.CallOption) (*GetBucketsResponse, error)
|
|
|
|
|
// GetBucket returns the details of a single k bucket from the kademlia instance
|
|
|
|
|
GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*GetBucketResponse, error)
|
|
|
|
|
// StatDB commands:
|
|
|
|
|
// GetStats returns the stats for a particular node ID
|
|
|
|
|
GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
|
|
|
|
|
// CreateStats creates a node with specified stats
|
|
|
|
|
CreateStats(ctx context.Context, in *CreateStatsRequest, opts ...grpc.CallOption) (*CreateStatsResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type inspectorClient struct {
|
|
|
|
@ -404,14 +605,39 @@ func (c *inspectorClient) GetBucket(ctx context.Context, in *GetBucketRequest, o
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// InspectorServer is the server API for Inspector service.
|
|
|
|
|
func (c *inspectorClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
|
|
|
|
|
out := new(GetStatsResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/inspector.Inspector/GetStats", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *inspectorClient) CreateStats(ctx context.Context, in *CreateStatsRequest, opts ...grpc.CallOption) (*CreateStatsResponse, error) {
|
|
|
|
|
out := new(CreateStatsResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/inspector.Inspector/CreateStats", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Server API for Inspector service
|
|
|
|
|
|
|
|
|
|
type InspectorServer interface {
|
|
|
|
|
// Kad/Overlay commands:
|
|
|
|
|
// CountNodes returns the number of nodes in the cache and in the routing table
|
|
|
|
|
CountNodes(context.Context, *CountNodesRequest) (*CountNodesResponse, error)
|
|
|
|
|
// GetBuckets returns the k buckets from a Kademlia instance
|
|
|
|
|
GetBuckets(context.Context, *GetBucketsRequest) (*GetBucketsResponse, error)
|
|
|
|
|
// GetBucket returns the details of a single k bucket from the kademlia instance
|
|
|
|
|
GetBucket(context.Context, *GetBucketRequest) (*GetBucketResponse, error)
|
|
|
|
|
// StatDB commands:
|
|
|
|
|
// GetStats returns the stats for a particular node ID
|
|
|
|
|
GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
|
|
|
|
|
// CreateStats creates a node with specified stats
|
|
|
|
|
CreateStats(context.Context, *CreateStatsRequest) (*CreateStatsResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterInspectorServer(s *grpc.Server, srv InspectorServer) {
|
|
|
|
@ -472,6 +698,42 @@ func _Inspector_GetBucket_Handler(srv interface{}, ctx context.Context, dec func
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Inspector_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(GetStatsRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(InspectorServer).GetStats(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/inspector.Inspector/GetStats",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(InspectorServer).GetStats(ctx, req.(*GetStatsRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Inspector_CreateStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(CreateStatsRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(InspectorServer).CreateStats(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/inspector.Inspector/CreateStats",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(InspectorServer).CreateStats(ctx, req.(*CreateStatsRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _Inspector_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "inspector.Inspector",
|
|
|
|
|
HandlerType: (*InspectorServer)(nil),
|
|
|
|
@ -488,33 +750,52 @@ var _Inspector_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
MethodName: "GetBucket",
|
|
|
|
|
Handler: _Inspector_GetBucket_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "GetStats",
|
|
|
|
|
Handler: _Inspector_GetStats_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "CreateStats",
|
|
|
|
|
Handler: _Inspector_CreateStats_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "inspector.proto",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_inspector_4eafe550bfab534a) }
|
|
|
|
|
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_inspector_ed07bb9d3058e441) }
|
|
|
|
|
|
|
|
|
|
var fileDescriptor_inspector_4eafe550bfab534a = []byte{
|
|
|
|
|
// 306 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x4e, 0x83, 0x40,
|
|
|
|
|
0x10, 0x86, 0x03, 0xd8, 0x2a, 0xa3, 0xd5, 0x3a, 0x7a, 0x20, 0x58, 0x93, 0x66, 0xbd, 0xf4, 0x22,
|
|
|
|
|
0x89, 0xf5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0xb2, 0xea, 0x5f, 0x6b, 0xf8, 0xf1, 0x7c,
|
|
|
|
|
0x14, 0x34, 0xbb, 0xa9, 0x26, 0x88, 0x94, 0x47, 0x6e, 0x61, 0xa8, 0x30, 0xfb, 0xa5, 0xdf, 0x01,
|
|
|
|
|
0xa8, 0xf4, 0x37, 0x26, 0x3a, 0x25, 0xd6, 0xee, 0x92, 0xf9, 0xaf, 0x05, 0x6e, 0xd8, 0x1c, 0x08,
|
|
|
|
|
0x43, 0x80, 0x76, 0x8b, 0x38, 0x09, 0xda, 0x5b, 0x6e, 0x2d, 0xd7, 0xbf, 0xde, 0xe1, 0xea, 0x79,
|
|
|
|
|
0x43, 0x80, 0x76, 0xcd, 0x1b, 0xa8, 0xad, 0x93, 0x6c, 0xa0, 0x7a, 0x6e, 0xf3, 0x04, 0xae, 0x51,
|
|
|
|
|
0xf1, 0xaa, 0x2f, 0xb7, 0x01, 0x4d, 0xfa, 0x4d, 0xc5, 0x59, 0x1c, 0x7c, 0xd8, 0xf9, 0x72, 0x39,
|
|
|
|
|
0xac, 0x1f, 0xdf, 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x49, 0x34, 0xe2, 0xa9, 0x02,
|
|
|
|
|
0x00, 0x00,
|
|
|
|
|
var fileDescriptor_inspector_ed07bb9d3058e441 = []byte{
|
|
|
|
|
// 485 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6f, 0xd3, 0x30,
|
|
|
|
|
0x14, 0xc7, 0x95, 0x64, 0xed, 0xd6, 0xd7, 0x8d, 0x6d, 0xaf, 0x43, 0x54, 0xd9, 0x80, 0x62, 0x2e,
|
|
|
|
|
0x15, 0x12, 0x15, 0x8c, 0x2b, 0xa7, 0x55, 0x62, 0x14, 0x4d, 0x1c, 0xb2, 0x1b, 0x97, 0x2a, 0x8b,
|
|
|
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