mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
parent
7a3509346a
commit
bb79707d15
76 changed files with 533 additions and 518 deletions
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v5.27.0
|
||||
// source: app/stats/command/command.proto
|
||||
|
||||
|
@ -565,7 +565,7 @@ func file_app_stats_command_command_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_app_stats_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_app_stats_command_command_proto_goTypes = []any{
|
||||
var file_app_stats_command_command_proto_goTypes = []interface{}{
|
||||
(*GetStatsRequest)(nil), // 0: xray.app.stats.command.GetStatsRequest
|
||||
(*Stat)(nil), // 1: xray.app.stats.command.Stat
|
||||
(*GetStatsResponse)(nil), // 2: xray.app.stats.command.GetStatsResponse
|
||||
|
@ -597,7 +597,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_app_stats_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetStatsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -609,7 +609,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Stat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -621,7 +621,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetStatsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -633,7 +633,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryStatsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -645,7 +645,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryStatsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -657,7 +657,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SysStatsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -669,7 +669,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SysStatsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -681,7 +681,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
file_app_stats_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Config); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v5.27.0
|
||||
// source: app/stats/command/command.proto
|
||||
|
||||
|
@ -15,8 +15,8 @@ import (
|
|||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
StatsService_GetStats_FullMethodName = "/xray.app.stats.command.StatsService/GetStats"
|
||||
|
@ -42,9 +42,8 @@ func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient {
|
|||
}
|
||||
|
||||
func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetStatsResponse)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetStats_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetStats_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -52,9 +51,8 @@ func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest,
|
|||
}
|
||||
|
||||
func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryStatsResponse)
|
||||
err := c.cc.Invoke(ctx, StatsService_QueryStats_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, StatsService_QueryStats_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -62,9 +60,8 @@ func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsReque
|
|||
}
|
||||
|
||||
func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SysStatsResponse)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetSysStats_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetSysStats_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -73,7 +70,7 @@ func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsReques
|
|||
|
||||
// StatsServiceServer is the server API for StatsService service.
|
||||
// All implementations must embed UnimplementedStatsServiceServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type StatsServiceServer interface {
|
||||
GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
|
||||
QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error)
|
||||
|
@ -81,12 +78,9 @@ type StatsServiceServer interface {
|
|||
mustEmbedUnimplementedStatsServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedStatsServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedStatsServiceServer struct{}
|
||||
// UnimplementedStatsServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedStatsServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
|
||||
|
@ -98,7 +92,6 @@ func (UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsReq
|
|||
return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented")
|
||||
}
|
||||
func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {}
|
||||
func (UnimplementedStatsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to StatsServiceServer will
|
||||
|
@ -108,13 +101,6 @@ type UnsafeStatsServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedStatsServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&StatsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue