rclone/vendor/storj.io/common/pb/nodestats.proto
2020-05-12 15:56:50 +00:00

59 lines
1.9 KiB
Protocol Buffer

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
syntax = "proto3";
option go_package = "storj.io/common/pb";
package nodestats;
import "gogo.proto";
import "google/protobuf/timestamp.proto";
service NodeStats {
rpc GetStats(GetStatsRequest) returns (GetStatsResponse);
rpc DailyStorageUsage(DailyStorageUsageRequest) returns (DailyStorageUsageResponse);
rpc PricingModel(PricingModelRequest) returns (PricingModelResponse);
}
message ReputationStats {
int64 total_count = 1;
int64 success_count = 2;
double reputation_alpha = 3;
double reputation_beta = 4;
double reputation_score = 5;
}
message GetStatsRequest {}
message GetStatsResponse {
ReputationStats uptime_check = 1;
ReputationStats audit_check = 2;
google.protobuf.Timestamp disqualified = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true];
google.protobuf.Timestamp suspended = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true];
google.protobuf.Timestamp joined_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}
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 = 1;
google.protobuf.Timestamp timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}
bytes node_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
repeated StorageUsage daily_storage_usage = 2;
}
message PricingModelRequest {}
message PricingModelResponse {
int64 egress_bandwidth_price = 1;
int64 repair_bandwidth_price = 2;
int64 disk_space_price = 3;
int64 audit_bandwidth_price = 4;
}