generated from rochacbruno/python-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba4b400
commit bc73aa2
Showing
8 changed files
with
172 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# sudo apt install -y protobuf-compiler | ||
#wget https://github.com/protocolbuffers/protobuf/releases/download/v23.1/protoc-23.1-linux-aarch_64.zip | ||
../../bin/protoc ./stats.proto --python_out=./ | ||
../../bin/protoc ./extensions.proto --python_out=./ | ||
python3 -m grpc_tools.protoc -I ./ --python_out=./ --grpc_python_out=./ ./stats.proto | ||
python3 -m grpc_tools.protoc -I ./ --python_out=./ --grpc_python_out=./ ./extensions.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
syntax = "proto3"; | ||
|
||
package v2ray.core.common.protoext; | ||
option csharp_namespace = "V2Ray.Core.Common.ProtoExt"; | ||
option go_package = "github.com/v2fly/v2ray-core/v5/common/protoext"; | ||
option java_package = "com.v2ray.core.common.protoext"; | ||
option java_multiple_files = true; | ||
|
||
import "google/protobuf/descriptor.proto"; | ||
|
||
extend google.protobuf.MessageOptions { | ||
MessageOpt message_opt = 50000; | ||
} | ||
|
||
extend google.protobuf.FieldOptions { | ||
FieldOpt field_opt = 50000; | ||
} | ||
|
||
message MessageOpt{ | ||
repeated string type = 1; | ||
repeated string short_name = 2; | ||
|
||
string transport_original_name = 86001; | ||
} | ||
|
||
message FieldOpt{ | ||
repeated string any_wants = 1; | ||
repeated string allowed_values = 2; | ||
repeated string allowed_value_types = 3; | ||
|
||
// convert_time_read_file_into read a file into another field, and clear this field during input parsing | ||
string convert_time_read_file_into = 4; | ||
// forbidden marks a boolean to be inaccessible to user | ||
bool forbidden = 5; | ||
// convert_time_resource_loading read a file, and place its resource hash into another field | ||
string convert_time_resource_loading = 6; | ||
// convert_time_parse_ip parse a string ip address, and put its binary representation into another field | ||
string convert_time_parse_ip = 7; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
syntax = "proto3"; | ||
|
||
package experimental.v2rayapi; | ||
option go_package = "github.com/sagernet/sing-box/experimental/v2rayapi"; | ||
|
||
message GetStatsRequest { | ||
// Name of the stat counter. | ||
string name = 1; | ||
// Whether or not to reset the counter to fetching its value. | ||
bool reset = 2; | ||
} | ||
|
||
message Stat { | ||
string name = 1; | ||
int64 value = 2; | ||
} | ||
|
||
message GetStatsResponse { | ||
Stat stat = 1; | ||
} | ||
|
||
message QueryStatsRequest { | ||
// Deprecated, use Patterns instead | ||
string pattern = 1; | ||
bool reset = 2; | ||
repeated string patterns = 3; | ||
bool regexp = 4; | ||
} | ||
|
||
message QueryStatsResponse { | ||
repeated Stat stat = 1; | ||
} | ||
|
||
message SysStatsRequest {} | ||
|
||
message SysStatsResponse { | ||
uint32 NumGoroutine = 1; | ||
uint32 NumGC = 2; | ||
uint64 Alloc = 3; | ||
uint64 TotalAlloc = 4; | ||
uint64 Sys = 5; | ||
uint64 Mallocs = 6; | ||
uint64 Frees = 7; | ||
uint64 LiveObjects = 8; | ||
uint64 PauseTotalNs = 9; | ||
uint32 Uptime = 10; | ||
} | ||
|
||
service StatsService { | ||
rpc GetStats(GetStatsRequest) returns (GetStatsResponse) {} | ||
rpc QueryStats(QueryStatsRequest) returns (QueryStatsResponse) {} | ||
rpc GetSysStats(SysStatsRequest) returns (SysStatsResponse) {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters