|
|
|
|
@ -0,0 +1,691 @@
|
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
|
|
|
// - protoc v5.29.3
|
|
|
|
|
// source: libcore.proto
|
|
|
|
|
|
|
|
|
|
package gen
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
context "context"
|
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
LibcoreService_Start_FullMethodName = "/libcore.LibcoreService/Start"
|
|
|
|
|
LibcoreService_Stop_FullMethodName = "/libcore.LibcoreService/Stop"
|
|
|
|
|
LibcoreService_CheckConfig_FullMethodName = "/libcore.LibcoreService/CheckConfig"
|
|
|
|
|
LibcoreService_Test_FullMethodName = "/libcore.LibcoreService/Test"
|
|
|
|
|
LibcoreService_StopTest_FullMethodName = "/libcore.LibcoreService/StopTest"
|
|
|
|
|
LibcoreService_QueryURLTest_FullMethodName = "/libcore.LibcoreService/QueryURLTest"
|
|
|
|
|
LibcoreService_QueryStats_FullMethodName = "/libcore.LibcoreService/QueryStats"
|
|
|
|
|
LibcoreService_ListConnections_FullMethodName = "/libcore.LibcoreService/ListConnections"
|
|
|
|
|
LibcoreService_GetGeoIPList_FullMethodName = "/libcore.LibcoreService/GetGeoIPList"
|
|
|
|
|
LibcoreService_GetGeoSiteList_FullMethodName = "/libcore.LibcoreService/GetGeoSiteList"
|
|
|
|
|
LibcoreService_CompileGeoIPToSrs_FullMethodName = "/libcore.LibcoreService/CompileGeoIPToSrs"
|
|
|
|
|
LibcoreService_CompileGeoSiteToSrs_FullMethodName = "/libcore.LibcoreService/CompileGeoSiteToSrs"
|
|
|
|
|
LibcoreService_SetSystemDNS_FullMethodName = "/libcore.LibcoreService/SetSystemDNS"
|
|
|
|
|
LibcoreService_IsPrivileged_FullMethodName = "/libcore.LibcoreService/IsPrivileged"
|
|
|
|
|
LibcoreService_SpeedTest_FullMethodName = "/libcore.LibcoreService/SpeedTest"
|
|
|
|
|
LibcoreService_QuerySpeedTest_FullMethodName = "/libcore.LibcoreService/QuerySpeedTest"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// LibcoreServiceClient is the client API for LibcoreService service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
|
|
|
type LibcoreServiceClient interface {
|
|
|
|
|
Start(ctx context.Context, in *LoadConfigReq, opts ...grpc.CallOption) (*ErrorResp, error)
|
|
|
|
|
Stop(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*ErrorResp, error)
|
|
|
|
|
CheckConfig(ctx context.Context, in *LoadConfigReq, opts ...grpc.CallOption) (*ErrorResp, error)
|
|
|
|
|
Test(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestResp, error)
|
|
|
|
|
StopTest(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*EmptyResp, error)
|
|
|
|
|
QueryURLTest(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*QueryURLTestResponse, error)
|
|
|
|
|
QueryStats(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*QueryStatsResp, error)
|
|
|
|
|
ListConnections(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*ListConnectionsResp, error)
|
|
|
|
|
GetGeoIPList(ctx context.Context, in *GeoListRequest, opts ...grpc.CallOption) (*GetGeoIPListResponse, error)
|
|
|
|
|
GetGeoSiteList(ctx context.Context, in *GeoListRequest, opts ...grpc.CallOption) (*GetGeoSiteListResponse, error)
|
|
|
|
|
CompileGeoIPToSrs(ctx context.Context, in *CompileGeoIPToSrsRequest, opts ...grpc.CallOption) (*EmptyResp, error)
|
|
|
|
|
CompileGeoSiteToSrs(ctx context.Context, in *CompileGeoSiteToSrsRequest, opts ...grpc.CallOption) (*EmptyResp, error)
|
|
|
|
|
SetSystemDNS(ctx context.Context, in *SetSystemDNSRequest, opts ...grpc.CallOption) (*EmptyResp, error)
|
|
|
|
|
IsPrivileged(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*IsPrivilegedResponse, error)
|
|
|
|
|
SpeedTest(ctx context.Context, in *SpeedTestRequest, opts ...grpc.CallOption) (*SpeedTestResponse, error)
|
|
|
|
|
QuerySpeedTest(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*QuerySpeedTestResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type libcoreServiceClient struct {
|
|
|
|
|
cc grpc.ClientConnInterface
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewLibcoreServiceClient(cc grpc.ClientConnInterface) LibcoreServiceClient {
|
|
|
|
|
return &libcoreServiceClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) Start(ctx context.Context, in *LoadConfigReq, opts ...grpc.CallOption) (*ErrorResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(ErrorResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_Start_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) Stop(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*ErrorResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(ErrorResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_Stop_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) CheckConfig(ctx context.Context, in *LoadConfigReq, opts ...grpc.CallOption) (*ErrorResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(ErrorResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_CheckConfig_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) Test(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(TestResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_Test_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) StopTest(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*EmptyResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(EmptyResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_StopTest_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) QueryURLTest(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*QueryURLTestResponse, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(QueryURLTestResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_QueryURLTest_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) QueryStats(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*QueryStatsResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(QueryStatsResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_QueryStats_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) ListConnections(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*ListConnectionsResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(ListConnectionsResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_ListConnections_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) GetGeoIPList(ctx context.Context, in *GeoListRequest, opts ...grpc.CallOption) (*GetGeoIPListResponse, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(GetGeoIPListResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_GetGeoIPList_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) GetGeoSiteList(ctx context.Context, in *GeoListRequest, opts ...grpc.CallOption) (*GetGeoSiteListResponse, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(GetGeoSiteListResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_GetGeoSiteList_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) CompileGeoIPToSrs(ctx context.Context, in *CompileGeoIPToSrsRequest, opts ...grpc.CallOption) (*EmptyResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(EmptyResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_CompileGeoIPToSrs_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) CompileGeoSiteToSrs(ctx context.Context, in *CompileGeoSiteToSrsRequest, opts ...grpc.CallOption) (*EmptyResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(EmptyResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_CompileGeoSiteToSrs_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) SetSystemDNS(ctx context.Context, in *SetSystemDNSRequest, opts ...grpc.CallOption) (*EmptyResp, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(EmptyResp)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_SetSystemDNS_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) IsPrivileged(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*IsPrivilegedResponse, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(IsPrivilegedResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_IsPrivileged_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) SpeedTest(ctx context.Context, in *SpeedTestRequest, opts ...grpc.CallOption) (*SpeedTestResponse, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(SpeedTestResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_SpeedTest_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *libcoreServiceClient) QuerySpeedTest(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*QuerySpeedTestResponse, error) {
|
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
out := new(QuerySpeedTestResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, LibcoreService_QuerySpeedTest_FullMethodName, in, out, cOpts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// LibcoreServiceServer is the server API for LibcoreService service.
|
|
|
|
|
// All implementations must embed UnimplementedLibcoreServiceServer
|
|
|
|
|
// for forward compatibility.
|
|
|
|
|
type LibcoreServiceServer interface {
|
|
|
|
|
Start(context.Context, *LoadConfigReq) (*ErrorResp, error)
|
|
|
|
|
Stop(context.Context, *EmptyReq) (*ErrorResp, error)
|
|
|
|
|
CheckConfig(context.Context, *LoadConfigReq) (*ErrorResp, error)
|
|
|
|
|
Test(context.Context, *TestReq) (*TestResp, error)
|
|
|
|
|
StopTest(context.Context, *EmptyReq) (*EmptyResp, error)
|
|
|
|
|
QueryURLTest(context.Context, *EmptyReq) (*QueryURLTestResponse, error)
|
|
|
|
|
QueryStats(context.Context, *EmptyReq) (*QueryStatsResp, error)
|
|
|
|
|
ListConnections(context.Context, *EmptyReq) (*ListConnectionsResp, error)
|
|
|
|
|
GetGeoIPList(context.Context, *GeoListRequest) (*GetGeoIPListResponse, error)
|
|
|
|
|
GetGeoSiteList(context.Context, *GeoListRequest) (*GetGeoSiteListResponse, error)
|
|
|
|
|
CompileGeoIPToSrs(context.Context, *CompileGeoIPToSrsRequest) (*EmptyResp, error)
|
|
|
|
|
CompileGeoSiteToSrs(context.Context, *CompileGeoSiteToSrsRequest) (*EmptyResp, error)
|
|
|
|
|
SetSystemDNS(context.Context, *SetSystemDNSRequest) (*EmptyResp, error)
|
|
|
|
|
IsPrivileged(context.Context, *EmptyReq) (*IsPrivilegedResponse, error)
|
|
|
|
|
SpeedTest(context.Context, *SpeedTestRequest) (*SpeedTestResponse, error)
|
|
|
|
|
QuerySpeedTest(context.Context, *EmptyReq) (*QuerySpeedTestResponse, error)
|
|
|
|
|
mustEmbedUnimplementedLibcoreServiceServer()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedLibcoreServiceServer 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 UnimplementedLibcoreServiceServer struct{}
|
|
|
|
|
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) Start(context.Context, *LoadConfigReq) (*ErrorResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) Stop(context.Context, *EmptyReq) (*ErrorResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) CheckConfig(context.Context, *LoadConfigReq) (*ErrorResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method CheckConfig not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) Test(context.Context, *TestReq) (*TestResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Test not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) StopTest(context.Context, *EmptyReq) (*EmptyResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method StopTest not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) QueryURLTest(context.Context, *EmptyReq) (*QueryURLTestResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method QueryURLTest not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) QueryStats(context.Context, *EmptyReq) (*QueryStatsResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) ListConnections(context.Context, *EmptyReq) (*ListConnectionsResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListConnections not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) GetGeoIPList(context.Context, *GeoListRequest) (*GetGeoIPListResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetGeoIPList not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) GetGeoSiteList(context.Context, *GeoListRequest) (*GetGeoSiteListResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetGeoSiteList not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) CompileGeoIPToSrs(context.Context, *CompileGeoIPToSrsRequest) (*EmptyResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method CompileGeoIPToSrs not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) CompileGeoSiteToSrs(context.Context, *CompileGeoSiteToSrsRequest) (*EmptyResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method CompileGeoSiteToSrs not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) SetSystemDNS(context.Context, *SetSystemDNSRequest) (*EmptyResp, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetSystemDNS not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) IsPrivileged(context.Context, *EmptyReq) (*IsPrivilegedResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method IsPrivileged not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) SpeedTest(context.Context, *SpeedTestRequest) (*SpeedTestResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SpeedTest not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) QuerySpeedTest(context.Context, *EmptyReq) (*QuerySpeedTestResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method QuerySpeedTest not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) mustEmbedUnimplementedLibcoreServiceServer() {}
|
|
|
|
|
func (UnimplementedLibcoreServiceServer) testEmbeddedByValue() {}
|
|
|
|
|
|
|
|
|
|
// UnsafeLibcoreServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
// Use of this interface is not recommended, as added methods to LibcoreServiceServer will
|
|
|
|
|
// result in compilation errors.
|
|
|
|
|
type UnsafeLibcoreServiceServer interface {
|
|
|
|
|
mustEmbedUnimplementedLibcoreServiceServer()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterLibcoreServiceServer(s grpc.ServiceRegistrar, srv LibcoreServiceServer) {
|
|
|
|
|
// If the following call pancis, it indicates UnimplementedLibcoreServiceServer 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(&LibcoreService_ServiceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(LoadConfigReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).Start(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_Start_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).Start(ctx, req.(*LoadConfigReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(EmptyReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).Stop(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_Stop_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).Stop(ctx, req.(*EmptyReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_CheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(LoadConfigReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).CheckConfig(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_CheckConfig_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).CheckConfig(ctx, req.(*LoadConfigReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(TestReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).Test(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_Test_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).Test(ctx, req.(*TestReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_StopTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(EmptyReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).StopTest(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_StopTest_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).StopTest(ctx, req.(*EmptyReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_QueryURLTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(EmptyReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).QueryURLTest(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_QueryURLTest_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).QueryURLTest(ctx, req.(*EmptyReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(EmptyReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).QueryStats(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_QueryStats_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).QueryStats(ctx, req.(*EmptyReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_ListConnections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(EmptyReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).ListConnections(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_ListConnections_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).ListConnections(ctx, req.(*EmptyReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_GetGeoIPList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(GeoListRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).GetGeoIPList(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_GetGeoIPList_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).GetGeoIPList(ctx, req.(*GeoListRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_GetGeoSiteList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(GeoListRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).GetGeoSiteList(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_GetGeoSiteList_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).GetGeoSiteList(ctx, req.(*GeoListRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_CompileGeoIPToSrs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(CompileGeoIPToSrsRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).CompileGeoIPToSrs(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_CompileGeoIPToSrs_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).CompileGeoIPToSrs(ctx, req.(*CompileGeoIPToSrsRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_CompileGeoSiteToSrs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(CompileGeoSiteToSrsRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).CompileGeoSiteToSrs(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_CompileGeoSiteToSrs_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).CompileGeoSiteToSrs(ctx, req.(*CompileGeoSiteToSrsRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_SetSystemDNS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(SetSystemDNSRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).SetSystemDNS(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_SetSystemDNS_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).SetSystemDNS(ctx, req.(*SetSystemDNSRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_IsPrivileged_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(EmptyReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).IsPrivileged(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_IsPrivileged_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).IsPrivileged(ctx, req.(*EmptyReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_SpeedTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(SpeedTestRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).SpeedTest(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_SpeedTest_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).SpeedTest(ctx, req.(*SpeedTestRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _LibcoreService_QuerySpeedTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(EmptyReq)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(LibcoreServiceServer).QuerySpeedTest(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: LibcoreService_QuerySpeedTest_FullMethodName,
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(LibcoreServiceServer).QuerySpeedTest(ctx, req.(*EmptyReq))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// LibcoreService_ServiceDesc is the grpc.ServiceDesc for LibcoreService service.
|
|
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
|
|
// and not to be introspected or modified (even as a copy)
|
|
|
|
|
var LibcoreService_ServiceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "libcore.LibcoreService",
|
|
|
|
|
HandlerType: (*LibcoreServiceServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Start",
|
|
|
|
|
Handler: _LibcoreService_Start_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Stop",
|
|
|
|
|
Handler: _LibcoreService_Stop_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "CheckConfig",
|
|
|
|
|
Handler: _LibcoreService_CheckConfig_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Test",
|
|
|
|
|
Handler: _LibcoreService_Test_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "StopTest",
|
|
|
|
|
Handler: _LibcoreService_StopTest_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "QueryURLTest",
|
|
|
|
|
Handler: _LibcoreService_QueryURLTest_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "QueryStats",
|
|
|
|
|
Handler: _LibcoreService_QueryStats_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "ListConnections",
|
|
|
|
|
Handler: _LibcoreService_ListConnections_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "GetGeoIPList",
|
|
|
|
|
Handler: _LibcoreService_GetGeoIPList_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "GetGeoSiteList",
|
|
|
|
|
Handler: _LibcoreService_GetGeoSiteList_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "CompileGeoIPToSrs",
|
|
|
|
|
Handler: _LibcoreService_CompileGeoIPToSrs_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "CompileGeoSiteToSrs",
|
|
|
|
|
Handler: _LibcoreService_CompileGeoSiteToSrs_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "SetSystemDNS",
|
|
|
|
|
Handler: _LibcoreService_SetSystemDNS_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "IsPrivileged",
|
|
|
|
|
Handler: _LibcoreService_IsPrivileged_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "SpeedTest",
|
|
|
|
|
Handler: _LibcoreService_SpeedTest_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "QuerySpeedTest",
|
|
|
|
|
Handler: _LibcoreService_QuerySpeedTest_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "libcore.proto",
|
|
|
|
|
}
|