Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBypassServer(s grpc.ServiceRegistrar, srv BypassServer)
- func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer)
- type BlockHistory
- func (*BlockHistory) Descriptor() ([]byte, []int)deprecated
- func (x *BlockHistory) GetHost() string
- func (x *BlockHistory) GetProcess() string
- func (x *BlockHistory) GetProtocol() string
- func (x *BlockHistory) GetTime() *timestamppb.Timestamp
- func (*BlockHistory) ProtoMessage()
- func (x *BlockHistory) ProtoReflect() protoreflect.Message
- func (x *BlockHistory) Reset()
- func (x *BlockHistory) String() string
- type BlockHistoryList
- func (*BlockHistoryList) Descriptor() ([]byte, []int)deprecated
- func (x *BlockHistoryList) GetDumpProcessEnabled() bool
- func (x *BlockHistoryList) GetObjects() []*BlockHistory
- func (*BlockHistoryList) ProtoMessage()
- func (x *BlockHistoryList) ProtoReflect() protoreflect.Message
- func (x *BlockHistoryList) Reset()
- func (x *BlockHistoryList) String() string
- type BypassClient
- type BypassServer
- type ConfigServiceClient
- type ConfigServiceServer
- type TestResponse
- func (*TestResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TestResponse) GetAfterAddr() string
- func (x *TestResponse) GetMode() *bypass.ModeConfig
- func (x *TestResponse) GetReason() string
- func (*TestResponse) ProtoMessage()
- func (x *TestResponse) ProtoReflect() protoreflect.Message
- func (x *TestResponse) Reset()
- func (x *TestResponse) String() string
- type UnimplementedBypassServer
- func (UnimplementedBypassServer) BlockHistory(context.Context, *emptypb.Empty) (*BlockHistoryList, error)
- func (UnimplementedBypassServer) Load(context.Context, *emptypb.Empty) (*bypass.Config, error)
- func (UnimplementedBypassServer) Reload(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedBypassServer) Save(context.Context, *bypass.Config) (*emptypb.Empty, error)
- func (UnimplementedBypassServer) Test(context.Context, *wrapperspb.StringValue) (*TestResponse, error)
- type UnimplementedConfigServiceServer
- func (UnimplementedConfigServiceServer) Info(context.Context, *emptypb.Empty) (*config.Info, error)
- func (UnimplementedConfigServiceServer) Load(context.Context, *emptypb.Empty) (*config.Setting, error)
- func (UnimplementedConfigServiceServer) Save(context.Context, *config.Setting) (*emptypb.Empty, error)
- type UnsafeBypassServer
- type UnsafeConfigServiceServer
Constants ¶
const ( ConfigService_Load_FullMethodName = "/yuhaiin.protos.config.service.config_service/load" ConfigService_Save_FullMethodName = "/yuhaiin.protos.config.service.config_service/save" ConfigService_Info_FullMethodName = "/yuhaiin.protos.config.service.config_service/info" )
const ( Bypass_Load_FullMethodName = "/yuhaiin.protos.config.service.bypass/load" Bypass_Save_FullMethodName = "/yuhaiin.protos.config.service.bypass/save" Bypass_Reload_FullMethodName = "/yuhaiin.protos.config.service.bypass/reload" Bypass_Test_FullMethodName = "/yuhaiin.protos.config.service.bypass/test" Bypass_BlockHistory_FullMethodName = "/yuhaiin.protos.config.service.bypass/block_history" )
Variables ¶
var Bypass_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuhaiin.protos.config.service.bypass", HandlerType: (*BypassServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "load", Handler: _Bypass_Load_Handler, }, { MethodName: "save", Handler: _Bypass_Save_Handler, }, { MethodName: "reload", Handler: _Bypass_Reload_Handler, }, { MethodName: "test", Handler: _Bypass_Test_Handler, }, { MethodName: "block_history", Handler: _Bypass_BlockHistory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "config/grpc/config.proto", }
Bypass_ServiceDesc is the grpc.ServiceDesc for Bypass service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ConfigService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuhaiin.protos.config.service.config_service", HandlerType: (*ConfigServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "load", Handler: _ConfigService_Load_Handler, }, { MethodName: "save", Handler: _ConfigService_Save_Handler, }, { MethodName: "info", Handler: _ConfigService_Info_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "config/grpc/config.proto", }
ConfigService_ServiceDesc is the grpc.ServiceDesc for ConfigService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_config_grpc_config_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBypassServer ¶ added in v0.3.7
func RegisterBypassServer(s grpc.ServiceRegistrar, srv BypassServer)
func RegisterConfigServiceServer ¶
func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer)
Types ¶
type BlockHistory ¶ added in v0.3.7
type BlockHistory struct { Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"` Process string `protobuf:"bytes,4,opt,name=process,proto3" json:"process,omitempty"` // contains filtered or unexported fields }
func (*BlockHistory) Descriptor
deprecated
added in
v0.3.7
func (*BlockHistory) Descriptor() ([]byte, []int)
Deprecated: Use BlockHistory.ProtoReflect.Descriptor instead.
func (*BlockHistory) GetHost ¶ added in v0.3.7
func (x *BlockHistory) GetHost() string
func (*BlockHistory) GetProcess ¶ added in v0.3.7
func (x *BlockHistory) GetProcess() string
func (*BlockHistory) GetProtocol ¶ added in v0.3.7
func (x *BlockHistory) GetProtocol() string
func (*BlockHistory) GetTime ¶ added in v0.3.7
func (x *BlockHistory) GetTime() *timestamppb.Timestamp
func (*BlockHistory) ProtoMessage ¶ added in v0.3.7
func (*BlockHistory) ProtoMessage()
func (*BlockHistory) ProtoReflect ¶ added in v0.3.7
func (x *BlockHistory) ProtoReflect() protoreflect.Message
func (*BlockHistory) Reset ¶ added in v0.3.7
func (x *BlockHistory) Reset()
func (*BlockHistory) String ¶ added in v0.3.7
func (x *BlockHistory) String() string
type BlockHistoryList ¶ added in v0.3.7
type BlockHistoryList struct { Objects []*BlockHistory `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"` DumpProcessEnabled bool `protobuf:"varint,2,opt,name=dump_process_enabled,proto3" json:"dump_process_enabled,omitempty"` // contains filtered or unexported fields }
func (*BlockHistoryList) Descriptor
deprecated
added in
v0.3.7
func (*BlockHistoryList) Descriptor() ([]byte, []int)
Deprecated: Use BlockHistoryList.ProtoReflect.Descriptor instead.
func (*BlockHistoryList) GetDumpProcessEnabled ¶ added in v0.3.7
func (x *BlockHistoryList) GetDumpProcessEnabled() bool
func (*BlockHistoryList) GetObjects ¶ added in v0.3.7
func (x *BlockHistoryList) GetObjects() []*BlockHistory
func (*BlockHistoryList) ProtoMessage ¶ added in v0.3.7
func (*BlockHistoryList) ProtoMessage()
func (*BlockHistoryList) ProtoReflect ¶ added in v0.3.7
func (x *BlockHistoryList) ProtoReflect() protoreflect.Message
func (*BlockHistoryList) Reset ¶ added in v0.3.7
func (x *BlockHistoryList) Reset()
func (*BlockHistoryList) String ¶ added in v0.3.7
func (x *BlockHistoryList) String() string
type BypassClient ¶ added in v0.3.7
type BypassClient interface { Load(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*bypass.Config, error) Save(ctx context.Context, in *bypass.Config, opts ...grpc.CallOption) (*emptypb.Empty, error) Reload(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Test(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*TestResponse, error) BlockHistory(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BlockHistoryList, error) }
BypassClient is the client API for Bypass 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.
func NewBypassClient ¶ added in v0.3.7
func NewBypassClient(cc grpc.ClientConnInterface) BypassClient
type BypassServer ¶ added in v0.3.7
type BypassServer interface { Load(context.Context, *emptypb.Empty) (*bypass.Config, error) Save(context.Context, *bypass.Config) (*emptypb.Empty, error) Reload(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Test(context.Context, *wrapperspb.StringValue) (*TestResponse, error) BlockHistory(context.Context, *emptypb.Empty) (*BlockHistoryList, error) // contains filtered or unexported methods }
BypassServer is the server API for Bypass service. All implementations must embed UnimplementedBypassServer for forward compatibility.
type ConfigServiceClient ¶
type ConfigServiceClient interface { Load(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*config.Setting, error) Save(ctx context.Context, in *config.Setting, opts ...grpc.CallOption) (*emptypb.Empty, error) Info(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*config.Info, error) }
ConfigServiceClient is the client API for ConfigService 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.
func NewConfigServiceClient ¶
func NewConfigServiceClient(cc grpc.ClientConnInterface) ConfigServiceClient
type ConfigServiceServer ¶
type ConfigServiceServer interface { Load(context.Context, *emptypb.Empty) (*config.Setting, error) Save(context.Context, *config.Setting) (*emptypb.Empty, error) Info(context.Context, *emptypb.Empty) (*config.Info, error) // contains filtered or unexported methods }
ConfigServiceServer is the server API for ConfigService service. All implementations must embed UnimplementedConfigServiceServer for forward compatibility.
type TestResponse ¶ added in v0.3.7
type TestResponse struct { Mode *bypass.ModeConfig `protobuf:"bytes,1,opt,name=mode,proto3" json:"mode,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` AfterAddr string `protobuf:"bytes,3,opt,name=after_addr,proto3" json:"after_addr,omitempty"` // contains filtered or unexported fields }
func (*TestResponse) Descriptor
deprecated
added in
v0.3.7
func (*TestResponse) Descriptor() ([]byte, []int)
Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.
func (*TestResponse) GetAfterAddr ¶ added in v0.3.7
func (x *TestResponse) GetAfterAddr() string
func (*TestResponse) GetMode ¶ added in v0.3.7
func (x *TestResponse) GetMode() *bypass.ModeConfig
func (*TestResponse) GetReason ¶ added in v0.3.7
func (x *TestResponse) GetReason() string
func (*TestResponse) ProtoMessage ¶ added in v0.3.7
func (*TestResponse) ProtoMessage()
func (*TestResponse) ProtoReflect ¶ added in v0.3.7
func (x *TestResponse) ProtoReflect() protoreflect.Message
func (*TestResponse) Reset ¶ added in v0.3.7
func (x *TestResponse) Reset()
func (*TestResponse) String ¶ added in v0.3.7
func (x *TestResponse) String() string
type UnimplementedBypassServer ¶ added in v0.3.7
type UnimplementedBypassServer struct{}
UnimplementedBypassServer 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.
func (UnimplementedBypassServer) BlockHistory ¶ added in v0.3.7
func (UnimplementedBypassServer) BlockHistory(context.Context, *emptypb.Empty) (*BlockHistoryList, error)
func (UnimplementedBypassServer) Test ¶ added in v0.3.7
func (UnimplementedBypassServer) Test(context.Context, *wrapperspb.StringValue) (*TestResponse, error)
type UnimplementedConfigServiceServer ¶
type UnimplementedConfigServiceServer struct{}
UnimplementedConfigServiceServer 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 UnsafeBypassServer ¶ added in v0.3.7
type UnsafeBypassServer interface {
// contains filtered or unexported methods
}
UnsafeBypassServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BypassServer will result in compilation errors.
type UnsafeConfigServiceServer ¶
type UnsafeConfigServiceServer interface {
// contains filtered or unexported methods
}
UnsafeConfigServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigServiceServer will result in compilation errors.