Documentation ¶
Index ¶
- Variables
- func FileExists(fileName string) (os.FileInfo, bool)
- func GenerateByParam(certPath, keyPath string, days int, ecdsaCurve, host string) error
- func ReadJsonFile(path string, v interface{}) error
- func RegisterCmdServiceServer(s grpc.ServiceRegistrar, srv CmdServiceServer)
- func StartCmdService(addr string, ctx context.Context)
- func WriteJsonFile(path string, v interface{}) error
- type CmdServiceClient
- type CmdServiceServer
- type CommonResponse
- type Config
- type EmptyRequest
- type LogLevel
- type UnimplementedCmdServiceServer
- func (UnimplementedCmdServiceServer) PrintLogLevel(context.Context, *EmptyRequest) (*CommonResponse, error)
- func (UnimplementedCmdServiceServer) ReloadConf(context.Context, *Config) (*CommonResponse, error)
- func (UnimplementedCmdServiceServer) SetLogLevel(context.Context, *LogLevel) (*CommonResponse, error)
- type UnsafeCmdServiceServer
Constants ¶
This section is empty.
Variables ¶
var CmdService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "utils.CmdService", HandlerType: (*CmdServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetLogLevel", Handler: _CmdService_SetLogLevel_Handler, }, { MethodName: "PrintLogLevel", Handler: _CmdService_PrintLogLevel_Handler, }, { MethodName: "ReloadConf", Handler: _CmdService_ReloadConf_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cmdService.proto", }
CmdService_ServiceDesc is the grpc.ServiceDesc for CmdService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cmdService_proto protoreflect.FileDescriptor
Functions ¶
func GenerateByParam ¶ added in v1.2.1
func ReadJsonFile ¶
func RegisterCmdServiceServer ¶ added in v1.1.2
func RegisterCmdServiceServer(s grpc.ServiceRegistrar, srv CmdServiceServer)
func StartCmdService ¶ added in v1.1.2
func WriteJsonFile ¶ added in v1.2.0
Types ¶
type CmdServiceClient ¶ added in v1.1.2
type CmdServiceClient interface { SetLogLevel(ctx context.Context, in *LogLevel, opts ...grpc.CallOption) (*CommonResponse, error) PrintLogLevel(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*CommonResponse, error) ReloadConf(ctx context.Context, in *Config, opts ...grpc.CallOption) (*CommonResponse, error) }
CmdServiceClient is the client API for CmdService 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 DialToCmdService ¶ added in v1.1.2
func DialToCmdService(addr string) CmdServiceClient
func NewCmdServiceClient ¶ added in v1.1.2
func NewCmdServiceClient(cc grpc.ClientConnInterface) CmdServiceClient
type CmdServiceServer ¶ added in v1.1.2
type CmdServiceServer interface { SetLogLevel(context.Context, *LogLevel) (*CommonResponse, error) PrintLogLevel(context.Context, *EmptyRequest) (*CommonResponse, error) ReloadConf(context.Context, *Config) (*CommonResponse, error) }
CmdServiceServer is the server API for CmdService service. All implementations should embed UnimplementedCmdServiceServer for forward compatibility
type CommonResponse ¶ added in v1.1.2
type CommonResponse struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*CommonResponse) Descriptor
deprecated
added in
v1.1.2
func (*CommonResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead.
func (*CommonResponse) GetMsg ¶ added in v1.1.2
func (x *CommonResponse) GetMsg() string
func (*CommonResponse) ProtoMessage ¶ added in v1.1.2
func (*CommonResponse) ProtoMessage()
func (*CommonResponse) ProtoReflect ¶ added in v1.1.2
func (x *CommonResponse) ProtoReflect() protoreflect.Message
func (*CommonResponse) Reset ¶ added in v1.1.2
func (x *CommonResponse) Reset()
func (*CommonResponse) String ¶ added in v1.1.2
func (x *CommonResponse) String() string
type Config ¶ added in v1.1.2
type Config struct { Show bool `protobuf:"varint,1,opt,name=show,proto3" json:"show,omitempty"` Mode string `protobuf:"bytes,2,opt,name=mode,proto3" json:"mode,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
added in
v1.1.2
func (*Config) ProtoMessage ¶ added in v1.1.2
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶ added in v1.1.2
func (x *Config) ProtoReflect() protoreflect.Message
type EmptyRequest ¶ added in v1.1.2
type EmptyRequest struct {
// contains filtered or unexported fields
}
func (*EmptyRequest) Descriptor
deprecated
added in
v1.1.2
func (*EmptyRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.
func (*EmptyRequest) ProtoMessage ¶ added in v1.1.2
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) ProtoReflect ¶ added in v1.1.2
func (x *EmptyRequest) ProtoReflect() protoreflect.Message
func (*EmptyRequest) Reset ¶ added in v1.1.2
func (x *EmptyRequest) Reset()
func (*EmptyRequest) String ¶ added in v1.1.2
func (x *EmptyRequest) String() string
type LogLevel ¶ added in v1.1.2
type LogLevel struct { Level string `protobuf:"bytes,1,opt,name=Level,proto3" json:"Level,omitempty"` // contains filtered or unexported fields }
func (*LogLevel) Descriptor
deprecated
added in
v1.1.2
func (*LogLevel) ProtoMessage ¶ added in v1.1.2
func (*LogLevel) ProtoMessage()
func (*LogLevel) ProtoReflect ¶ added in v1.1.2
func (x *LogLevel) ProtoReflect() protoreflect.Message
type UnimplementedCmdServiceServer ¶ added in v1.1.2
type UnimplementedCmdServiceServer struct { }
UnimplementedCmdServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedCmdServiceServer) PrintLogLevel ¶ added in v1.1.2
func (UnimplementedCmdServiceServer) PrintLogLevel(context.Context, *EmptyRequest) (*CommonResponse, error)
func (UnimplementedCmdServiceServer) ReloadConf ¶ added in v1.1.2
func (UnimplementedCmdServiceServer) ReloadConf(context.Context, *Config) (*CommonResponse, error)
func (UnimplementedCmdServiceServer) SetLogLevel ¶ added in v1.1.2
func (UnimplementedCmdServiceServer) SetLogLevel(context.Context, *LogLevel) (*CommonResponse, error)
type UnsafeCmdServiceServer ¶ added in v1.1.2
type UnsafeCmdServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCmdServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CmdServiceServer will result in compilation errors.