storj/pkg/pb/nodestats.proto
2019-07-04 13:41:40 +03:00

53 lines
1.5 KiB
Protocol Buffer

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
syntax = "proto3";
option go_package = "pb";
package nodestats;
import "gogo.proto";
import "google/protobuf/timestamp.proto";
service NodeStats {
rpc AuditCheck(AuditCheckRequest) returns (AuditCheckResponse);
rpc UptimeCheck(UptimeCheckRequest) returns (UptimeCheckResponse);
rpc DailyStorageUsage(DailyStorageUsageRequest) returns (DailyStorageUsageResponse);
}
message AuditCheckRequest {}
message AuditCheckResponse {
int64 total_count = 1;
int64 success_count = 2;
double reputation_alpha = 3;
double reputation_beta = 4;
double reputation_score = 5;
}
message UptimeCheckRequest {}
message UptimeCheckResponse {
int64 total_count = 1;
int64 success_count = 2;
double reputation_alpha = 3;
double reputation_beta = 4;
double reputation_score = 5;
}
message DailyStorageUsageRequest {
google.protobuf.Timestamp from = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
google.protobuf.Timestamp to = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}
message DailyStorageUsageResponse {
message StorageUsage {
double at_rest_total = 2;
google.protobuf.Timestamp time_stamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}
bytes node_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
repeated StorageUsage daily_storage_usage = 2;
}