Documentation ¶
Index ¶
- Variables
- func RegisterCmdServiceServer(s grpc.ServiceRegistrar, srv CmdServiceServer)
- func StartCmdService(port string)
- type AccessAddress
- func (*AccessAddress) Descriptor() ([]byte, []int)deprecated
- func (x *AccessAddress) GetAdddr() string
- func (x *AccessAddress) GetOp() int32
- func (*AccessAddress) ProtoMessage()
- func (x *AccessAddress) ProtoReflect() protoreflect.Message
- func (x *AccessAddress) Reset()
- func (x *AccessAddress) String() string
- type CmdServiceClient
- type CmdServiceServer
- type CommonResponse
- type CounterResult
- func (*CounterResult) Descriptor() ([]byte, []int)deprecated
- func (x *CounterResult) GetBucket() int32
- func (x *CounterResult) GetId() int32
- func (*CounterResult) ProtoMessage()
- func (x *CounterResult) ProtoReflect() protoreflect.Message
- func (x *CounterResult) Reset()
- func (x *CounterResult) String() string
- type EmptyReq
- type EmptyRequest
- type LogLevel
- type ReceiptOneReq
- func (*ReceiptOneReq) Descriptor() ([]byte, []int)deprecated
- func (x *ReceiptOneReq) GetCredit() string
- func (x *ReceiptOneReq) GetReport() int32
- func (x *ReceiptOneReq) GetUser() string
- func (*ReceiptOneReq) ProtoMessage()
- func (x *ReceiptOneReq) ProtoReflect() protoreflect.Message
- func (x *ReceiptOneReq) Reset()
- func (x *ReceiptOneReq) String() string
- type ReceiptReq
- type UnimplementedCmdServiceServer
- type UnsafeCmdServiceServer
- type UserCounterReq
- type UserInfoReq
- type WebPort
Constants ¶
This section is empty.
Variables ¶
var AdvertiseCmd = &cobra.Command{
Use: "adv",
Short: "miner's network layer address",
Long: `TODO::.`,
Run: advertiseOp,
}
var CMDServicePort = "12776"
var CmdService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbs.CmdService", HandlerType: (*CmdServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetLogLevel", Handler: _CmdService_SetLogLevel_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 ConfCmd = &cobra.Command{
Use: "conf",
Short: "config self to block chain service",
Long: `TODO::.`,
Run: configReg,
}
var File_cmdService_proto protoreflect.FileDescriptor
var InitCmd = &cobra.Command{
Use: "init",
Short: "init miner node",
Long: `TODO::.`,
Run: initMiner,
}
var ShowAddrCmd = &cobra.Command{
Use: "address",
Short: "miner's network layer address",
Long: `TODO::.`,
Run: showAddr,
}
var ShowCmd = &cobra.Command{
Use: "one",
Short: "one miner's basic info",
Long: `TODO::.`,
}
Functions ¶
func RegisterCmdServiceServer ¶
func RegisterCmdServiceServer(s grpc.ServiceRegistrar, srv CmdServiceServer)
func StartCmdService ¶
func StartCmdService(port string)
Types ¶
type AccessAddress ¶
type AccessAddress struct { Adddr string `protobuf:"bytes,1,opt,name=Adddr,proto3" json:"Adddr,omitempty"` Op int32 `protobuf:"varint,2,opt,name=op,proto3" json:"op,omitempty"` // contains filtered or unexported fields }
func (*AccessAddress) Descriptor
deprecated
func (*AccessAddress) Descriptor() ([]byte, []int)
Deprecated: Use AccessAddress.ProtoReflect.Descriptor instead.
func (*AccessAddress) GetAdddr ¶
func (x *AccessAddress) GetAdddr() string
func (*AccessAddress) GetOp ¶
func (x *AccessAddress) GetOp() int32
func (*AccessAddress) ProtoMessage ¶
func (*AccessAddress) ProtoMessage()
func (*AccessAddress) ProtoReflect ¶
func (x *AccessAddress) ProtoReflect() protoreflect.Message
func (*AccessAddress) Reset ¶
func (x *AccessAddress) Reset()
func (*AccessAddress) String ¶
func (x *AccessAddress) String() string
type CmdServiceClient ¶
type CmdServiceClient interface {
SetLogLevel(ctx context.Context, in *LogLevel, 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 ¶
func DialToCmdService() CmdServiceClient
func NewCmdServiceClient ¶
func NewCmdServiceClient(cc grpc.ClientConnInterface) CmdServiceClient
type CmdServiceServer ¶
type CmdServiceServer interface {
SetLogLevel(context.Context, *LogLevel) (*CommonResponse, error)
}
CmdServiceServer is the server API for CmdService service. All implementations should embed UnimplementedCmdServiceServer for forward compatibility
type CommonResponse ¶
type CommonResponse struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*CommonResponse) Descriptor
deprecated
func (*CommonResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead.
func (*CommonResponse) GetMsg ¶
func (x *CommonResponse) GetMsg() string
func (*CommonResponse) ProtoMessage ¶
func (*CommonResponse) ProtoMessage()
func (*CommonResponse) ProtoReflect ¶
func (x *CommonResponse) ProtoReflect() protoreflect.Message
func (*CommonResponse) Reset ¶
func (x *CommonResponse) Reset()
func (*CommonResponse) String ¶
func (x *CommonResponse) String() string
type CounterResult ¶
type CounterResult struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Bucket int32 `protobuf:"varint,2,opt,name=bucket,proto3" json:"bucket,omitempty"` // contains filtered or unexported fields }
func (*CounterResult) Descriptor
deprecated
func (*CounterResult) Descriptor() ([]byte, []int)
Deprecated: Use CounterResult.ProtoReflect.Descriptor instead.
func (*CounterResult) GetBucket ¶
func (x *CounterResult) GetBucket() int32
func (*CounterResult) GetId ¶
func (x *CounterResult) GetId() int32
func (*CounterResult) ProtoMessage ¶
func (*CounterResult) ProtoMessage()
func (*CounterResult) ProtoReflect ¶
func (x *CounterResult) ProtoReflect() protoreflect.Message
func (*CounterResult) Reset ¶
func (x *CounterResult) Reset()
func (*CounterResult) String ¶
func (x *CounterResult) String() string
type EmptyReq ¶
type EmptyReq struct {
// contains filtered or unexported fields
}
func (*EmptyReq) Descriptor
deprecated
func (*EmptyReq) ProtoMessage ¶
func (*EmptyReq) ProtoMessage()
func (*EmptyReq) ProtoReflect ¶
func (x *EmptyReq) ProtoReflect() protoreflect.Message
type EmptyRequest ¶
type EmptyRequest struct {
// contains filtered or unexported fields
}
func (*EmptyRequest) Descriptor
deprecated
func (*EmptyRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.
func (*EmptyRequest) ProtoMessage ¶
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) ProtoReflect ¶
func (x *EmptyRequest) ProtoReflect() protoreflect.Message
func (*EmptyRequest) Reset ¶
func (x *EmptyRequest) Reset()
func (*EmptyRequest) String ¶
func (x *EmptyRequest) String() string
type LogLevel ¶
type LogLevel struct { Module string `protobuf:"bytes,1,opt,name=Module,proto3" json:"Module,omitempty"` Level int32 `protobuf:"varint,2,opt,name=Level,proto3" json:"Level,omitempty"` // contains filtered or unexported fields }
func (*LogLevel) Descriptor
deprecated
func (*LogLevel) ProtoMessage ¶
func (*LogLevel) ProtoMessage()
func (*LogLevel) ProtoReflect ¶
func (x *LogLevel) ProtoReflect() protoreflect.Message
type ReceiptOneReq ¶
type ReceiptOneReq struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Credit string `protobuf:"bytes,2,opt,name=credit,proto3" json:"credit,omitempty"` Report int32 `protobuf:"varint,3,opt,name=report,proto3" json:"report,omitempty"` // contains filtered or unexported fields }
func (*ReceiptOneReq) Descriptor
deprecated
func (*ReceiptOneReq) Descriptor() ([]byte, []int)
Deprecated: Use ReceiptOneReq.ProtoReflect.Descriptor instead.
func (*ReceiptOneReq) GetCredit ¶
func (x *ReceiptOneReq) GetCredit() string
func (*ReceiptOneReq) GetReport ¶
func (x *ReceiptOneReq) GetReport() int32
func (*ReceiptOneReq) GetUser ¶
func (x *ReceiptOneReq) GetUser() string
func (*ReceiptOneReq) ProtoMessage ¶
func (*ReceiptOneReq) ProtoMessage()
func (*ReceiptOneReq) ProtoReflect ¶
func (x *ReceiptOneReq) ProtoReflect() protoreflect.Message
func (*ReceiptOneReq) Reset ¶
func (x *ReceiptOneReq) Reset()
func (*ReceiptOneReq) String ¶
func (x *ReceiptOneReq) String() string
type ReceiptReq ¶
type ReceiptReq struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Report int32 `protobuf:"varint,2,opt,name=report,proto3" json:"report,omitempty"` // contains filtered or unexported fields }
func (*ReceiptReq) Descriptor
deprecated
func (*ReceiptReq) Descriptor() ([]byte, []int)
Deprecated: Use ReceiptReq.ProtoReflect.Descriptor instead.
func (*ReceiptReq) GetReport ¶
func (x *ReceiptReq) GetReport() int32
func (*ReceiptReq) GetUser ¶
func (x *ReceiptReq) GetUser() string
func (*ReceiptReq) ProtoMessage ¶
func (*ReceiptReq) ProtoMessage()
func (*ReceiptReq) ProtoReflect ¶
func (x *ReceiptReq) ProtoReflect() protoreflect.Message
func (*ReceiptReq) Reset ¶
func (x *ReceiptReq) Reset()
func (*ReceiptReq) String ¶
func (x *ReceiptReq) String() string
type UnimplementedCmdServiceServer ¶
type UnimplementedCmdServiceServer struct { }
UnimplementedCmdServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedCmdServiceServer) SetLogLevel ¶
func (UnimplementedCmdServiceServer) SetLogLevel(context.Context, *LogLevel) (*CommonResponse, error)
type UnsafeCmdServiceServer ¶
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.
type UserCounterReq ¶
type UserCounterReq struct { User string `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"` // contains filtered or unexported fields }
func (*UserCounterReq) Descriptor
deprecated
func (*UserCounterReq) Descriptor() ([]byte, []int)
Deprecated: Use UserCounterReq.ProtoReflect.Descriptor instead.
func (*UserCounterReq) GetUser ¶
func (x *UserCounterReq) GetUser() string
func (*UserCounterReq) ProtoMessage ¶
func (*UserCounterReq) ProtoMessage()
func (*UserCounterReq) ProtoReflect ¶
func (x *UserCounterReq) ProtoReflect() protoreflect.Message
func (*UserCounterReq) Reset ¶
func (x *UserCounterReq) Reset()
func (*UserCounterReq) String ¶
func (x *UserCounterReq) String() string
type UserInfoReq ¶
type UserInfoReq struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserInfoReq) Descriptor
deprecated
func (*UserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoReq.ProtoReflect.Descriptor instead.
func (*UserInfoReq) GetUser ¶
func (x *UserInfoReq) GetUser() string
func (*UserInfoReq) ProtoMessage ¶
func (*UserInfoReq) ProtoMessage()
func (*UserInfoReq) ProtoReflect ¶
func (x *UserInfoReq) ProtoReflect() protoreflect.Message
func (*UserInfoReq) Reset ¶
func (x *UserInfoReq) Reset()
func (*UserInfoReq) String ¶
func (x *UserInfoReq) String() string
type WebPort ¶
type WebPort struct { Port int32 `protobuf:"varint,1,opt,name=Port,proto3" json:"Port,omitempty"` // contains filtered or unexported fields }
func (*WebPort) Descriptor
deprecated
func (*WebPort) ProtoMessage ¶
func (*WebPort) ProtoMessage()
func (*WebPort) ProtoReflect ¶
func (x *WebPort) ProtoReflect() protoreflect.Message