satellite/nodestats: add disqualified flag #2856

This commit is contained in:
Yaroslav Vorobiov 2019-08-23 13:58:20 +03:00 committed by GitHub
parent 12d50ebb99
commit 2ae4129d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 59 additions and 33 deletions

View File

@ -129,6 +129,7 @@ var xxx_messageInfo_GetStatsRequest proto.InternalMessageInfo
type GetStatsResponse struct {
UptimeCheck *ReputationStats `protobuf:"bytes,1,opt,name=uptime_check,json=uptimeCheck,proto3" json:"uptime_check,omitempty"`
AuditCheck *ReputationStats `protobuf:"bytes,2,opt,name=audit_check,json=auditCheck,proto3" json:"audit_check,omitempty"`
Disqualified *time.Time `protobuf:"bytes,3,opt,name=disqualified,proto3,stdtime" json:"disqualified,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -172,6 +173,13 @@ func (m *GetStatsResponse) GetAuditCheck() *ReputationStats {
return nil
}
func (m *GetStatsResponse) GetDisqualified() *time.Time {
if m != nil {
return m.Disqualified
}
return nil
}
type DailyStorageUsageRequest struct {
From time.Time `protobuf:"bytes,1,opt,name=from,proto3,stdtime" json:"from"`
To time.Time `protobuf:"bytes,2,opt,name=to,proto3,stdtime" json:"to"`
@ -317,39 +325,40 @@ func init() {
func init() { proto.RegisterFile("nodestats.proto", fileDescriptor_e0b184ee117142aa) }
var fileDescriptor_e0b184ee117142aa = []byte{
// 503 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0x86, 0x59, 0x27, 0x84, 0x66, 0x9c, 0x36, 0xcd, 0x72, 0x31, 0xe6, 0xe0, 0xc8, 0x45, 0x6a,
0xb8, 0xb8, 0x22, 0x70, 0x40, 0x42, 0x1c, 0x70, 0x2a, 0xa1, 0x5e, 0x38, 0x38, 0xe5, 0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0xe6,
0x5c, 0x62, 0xa8, 0x8f, 0x54, 0x77, 0x48, 0x02, 0x93, 0x61, 0xc0, 0x25, 0x9e, 0x2b, 0x44, 0x7d,
0xe8, 0xd7, 0xa7, 0xff, 0x5f, 0xd1, 0x34, 0x65, 0xd3, 0x2f, 0x04, 0xfa, 0x6a, 0xda, 0xf2, 0x5f,
0x32, 0x83, 0xbd, 0xcd, 0x31, 0xd1, 0xed, 0x85, 0xb7, 0xae, 0xce, 0xbe, 0x7b, 0xed, 0x5b, 0x15,
0xeb, 0x6b, 0x18, 0xfd, 0x96, 0x03, 0x3d, 0xfa, 0x7b, 0x4a, 0xa5, 0xed, 0xbd, 0x5d, 0xa2, 0xf4,
0xbb, 0xaf, 0x8c, 0x6c, 0xb1, 0xe8, 0xe9, 0x09, 0x1f, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x83,
0x66, 0x1e, 0x03, 0x36, 0x04, 0x00, 0x00,
// 524 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x41, 0x6e, 0xd3, 0x40,
0x14, 0x65, 0x9c, 0x10, 0x9a, 0xef, 0xb4, 0x69, 0x86, 0x8d, 0x09, 0x8b, 0x44, 0x2e, 0x52, 0xc3,
0xc6, 0x15, 0x81, 0x05, 0x12, 0x62, 0x81, 0x53, 0x09, 0xba, 0x61, 0xe1, 0x94, 0x0d, 0x0b, 0xac,
0x89, 0x3d, 0x71, 0x2d, 0x9c, 0x8c, 0xeb, 0xf9, 0x46, 0xe2, 0x0a, 0xac, 0xb8, 0x01, 0x57, 0xe0,
0x18, 0x9c, 0x00, 0x21, 0x16, 0xe5, 0x2a, 0x68, 0xc6, 0x8e, 0x9d, 0x9a, 0x52, 0xca, 0xd2, 0x6f,
0xde, 0x7b, 0x9e, 0xf7, 0xfe, 0x1f, 0xe8, 0xaf, 0x45, 0xc8, 0x25, 0x32, 0x94, 0x4e,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 0xe9, 0x57, 0x02,
0x5d, 0x95, 0xb6, 0x78, 0x6f, 0x33, 0xd8, 0xd9, 0xac, 0x25, 0xdd, 0x5e, 0x9d, 0xc6, 0xfe, 0x0e,
0xef, 0x5f, 0x79, 0x56, 0xd6, 0xfa, 0x0e, 0x06, 0x7f, 0xf4, 0x40, 0x0f, 0xae, 0x6f, 0xa9, 0xb0,
0x7d, 0x70, 0x93, 0x2a, 0xdd, 0xf6, 0x5b, 0x23, 0x5d, 0x2c, 0x3a, 0x3a, 0xe1, 0xe3, 0xdf, 0x01,
0x00, 0x00, 0xff, 0xff, 0xad, 0xd9, 0x13, 0x89, 0x80, 0x04, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@ -27,6 +27,7 @@ message GetStatsRequest {}
message GetStatsResponse {
ReputationStats uptime_check = 1;
ReputationStats audit_check = 2;
google.protobuf.Timestamp disqualified = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true];
}
message DailyStorageUsageRequest {

View File

@ -4039,6 +4039,21 @@
"id": 2,
"name": "audit_check",
"type": "ReputationStats"
},
{
"id": 3,
"name": "disqualified",
"type": "google.protobuf.Timestamp",
"options": [
{
"name": "(gogoproto.stdtime)",
"value": "true"
},
{
"name": "(gogoproto.nullable)",
"value": "true"
}
]
}
]
},

View File

@ -77,6 +77,7 @@ func (e *Endpoint) GetStats(ctx context.Context, req *pb.GetStatsRequest) (_ *pb
ReputationBeta: node.Reputation.AuditReputationBeta,
ReputationScore: auditScore,
},
Disqualified: node.Disqualified,
}, nil
}