Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterScanServer(s grpc.ServiceRegistrar, srv ScanServer)
- type C2S
- func (*C2S) Descriptor() ([]byte, []int)deprecated
- func (x *C2S) GetActiveContent() bool
- func (x *C2S) GetBulk() bool
- func (x *C2S) GetChunk() []byte
- func (x *C2S) GetFileName() string
- func (x *C2S) GetFileSha1() string
- func (x *C2S) GetFileSha256() string
- func (x *C2S) GetOffset() int32
- func (x *C2S) GetRsSize() uint64
- func (x *C2S) GetSpnFeedback() bool
- func (x *C2S) GetStage() Stage
- func (x *C2S) GetTags() []string
- func (x *C2S) GetTrendx() bool
- func (x *C2S) GetVerbose() bool
- func (*C2S) ProtoMessage()
- func (x *C2S) ProtoReflect() protoreflect.Message
- func (x *C2S) Reset()
- func (x *C2S) String() string
- type Command
- type S2C
- func (*S2C) Descriptor() ([]byte, []int)deprecated
- func (x *S2C) GetBulkLength() []int32
- func (x *S2C) GetBulkOffset() []int32
- func (x *S2C) GetCmd() Command
- func (x *S2C) GetLength() int32
- func (x *S2C) GetOffset() int32
- func (x *S2C) GetResult() string
- func (x *S2C) GetSessionId() string
- func (x *S2C) GetStage() Stage
- func (*S2C) ProtoMessage()
- func (x *S2C) ProtoReflect() protoreflect.Message
- func (x *S2C) Reset()
- func (x *S2C) String() string
- type ScanClient
- type ScanServer
- type Scan_RunClient
- type Scan_RunServer
- type Stage
- type UnimplementedScanServer
- type UnsafeScanServer
Constants ¶
const (
Scan_Run_FullMethodName = "/amaas.scan.v1.Scan/Run"
)
Variables ¶
var ( Stage_name = map[int32]string{ 0: "STAGE_INIT", 1: "STAGE_RUN", 2: "STAGE_FINI", } Stage_value = map[string]int32{ "STAGE_INIT": 0, "STAGE_RUN": 1, "STAGE_FINI": 2, } )
Enum value maps for Stage.
var ( Command_name = map[int32]string{ 0: "CMD_RETR", 1: "CMD_QUIT", } Command_value = map[string]int32{ "CMD_RETR": 0, "CMD_QUIT": 1, } )
Enum value maps for Command.
var File_scan_proto protoreflect.FileDescriptor
var Scan_ServiceDesc = grpc.ServiceDesc{ ServiceName: "amaas.scan.v1.Scan", HandlerType: (*ScanServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Run", Handler: _Scan_Run_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "scan.proto", }
Scan_ServiceDesc is the grpc.ServiceDesc for Scan service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterScanServer ¶
func RegisterScanServer(s grpc.ServiceRegistrar, srv ScanServer)
Types ¶
type C2S ¶
type C2S struct { Stage Stage `protobuf:"varint,1,opt,name=stage,proto3,enum=amaas.scan.v1.Stage" json:"stage,omitempty"` FileName string `protobuf:"bytes,2,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` RsSize uint64 `protobuf:"varint,3,opt,name=rs_size,json=rsSize,proto3" json:"rs_size,omitempty"` Offset int32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` Chunk []byte `protobuf:"bytes,5,opt,name=chunk,proto3" json:"chunk,omitempty"` Trendx bool `protobuf:"varint,6,opt,name=trendx,proto3" json:"trendx,omitempty"` FileSha1 string `protobuf:"bytes,7,opt,name=file_sha1,json=fileSha1,proto3" json:"file_sha1,omitempty"` FileSha256 string `protobuf:"bytes,8,opt,name=file_sha256,json=fileSha256,proto3" json:"file_sha256,omitempty"` Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"` Bulk bool `protobuf:"varint,10,opt,name=bulk,proto3" json:"bulk,omitempty"` SpnFeedback bool `protobuf:"varint,11,opt,name=spn_feedback,json=spnFeedback,proto3" json:"spn_feedback,omitempty"` Verbose bool `protobuf:"varint,12,opt,name=verbose,proto3" json:"verbose,omitempty"` ActiveContent bool `protobuf:"varint,13,opt,name=active_content,json=activeContent,proto3" json:"active_content,omitempty"` // contains filtered or unexported fields }
func (*C2S) Descriptor
deprecated
func (*C2S) GetActiveContent ¶ added in v1.6.0
func (*C2S) GetFileName ¶
func (*C2S) GetFileSha1 ¶
func (*C2S) GetFileSha256 ¶
func (*C2S) GetSpnFeedback ¶
func (*C2S) GetVerbose ¶ added in v1.2.0
func (*C2S) ProtoMessage ¶
func (*C2S) ProtoMessage()
func (*C2S) ProtoReflect ¶
func (x *C2S) ProtoReflect() protoreflect.Message
type Command ¶
type Command int32
func (Command) Descriptor ¶
func (Command) Descriptor() protoreflect.EnumDescriptor
func (Command) EnumDescriptor
deprecated
func (Command) Number ¶
func (x Command) Number() protoreflect.EnumNumber
func (Command) Type ¶
func (Command) Type() protoreflect.EnumType
type S2C ¶
type S2C struct { Stage Stage `protobuf:"varint,1,opt,name=stage,proto3,enum=amaas.scan.v1.Stage" json:"stage,omitempty"` Cmd Command `protobuf:"varint,2,opt,name=cmd,proto3,enum=amaas.scan.v1.Command" json:"cmd,omitempty"` Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` Length int32 `protobuf:"varint,4,opt,name=length,proto3" json:"length,omitempty"` Result string `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` BulkOffset []int32 `protobuf:"varint,6,rep,packed,name=bulk_offset,json=bulkOffset,proto3" json:"bulk_offset,omitempty"` BulkLength []int32 `protobuf:"varint,7,rep,packed,name=bulk_length,json=bulkLength,proto3" json:"bulk_length,omitempty"` SessionId string `protobuf:"bytes,8,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // contains filtered or unexported fields }
func (*S2C) Descriptor
deprecated
func (*S2C) GetBulkLength ¶
func (*S2C) GetBulkOffset ¶
func (*S2C) GetSessionId ¶
func (*S2C) ProtoMessage ¶
func (*S2C) ProtoMessage()
func (*S2C) ProtoReflect ¶
func (x *S2C) ProtoReflect() protoreflect.Message
type ScanClient ¶
type ScanClient interface {
Run(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[C2S, S2C], error)
}
ScanClient is the client API for Scan 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.
Interface exported by the server.
func NewScanClient ¶
func NewScanClient(cc grpc.ClientConnInterface) ScanClient
type ScanServer ¶
type ScanServer interface { Run(grpc.BidiStreamingServer[C2S, S2C]) error // contains filtered or unexported methods }
ScanServer is the server API for Scan service. All implementations must embed UnimplementedScanServer for forward compatibility.
Interface exported by the server.
type Scan_RunClient ¶
type Scan_RunClient = grpc.BidiStreamingClient[C2S, S2C]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Scan_RunServer ¶
type Scan_RunServer = grpc.BidiStreamingServer[C2S, S2C]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Stage ¶
type Stage int32
func (Stage) Descriptor ¶
func (Stage) Descriptor() protoreflect.EnumDescriptor
func (Stage) EnumDescriptor
deprecated
func (Stage) Number ¶
func (x Stage) Number() protoreflect.EnumNumber
func (Stage) Type ¶
func (Stage) Type() protoreflect.EnumType
type UnimplementedScanServer ¶
type UnimplementedScanServer struct{}
UnimplementedScanServer 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 (UnimplementedScanServer) Run ¶
func (UnimplementedScanServer) Run(grpc.BidiStreamingServer[C2S, S2C]) error
type UnsafeScanServer ¶
type UnsafeScanServer interface {
// contains filtered or unexported methods
}
UnsafeScanServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScanServer will result in compilation errors.