Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCollectorHTTPServer(s *http.Server, srv CollectorHTTPServer)
- func RegisterCollectorServer(s grpc.ServiceRegistrar, srv CollectorServer)
- type CollectorClient
- type CollectorHTTPClient
- type CollectorHTTPClientImpl
- type CollectorHTTPServer
- type CollectorServer
- type Collector_GetDeviceStreamEventClient
- type Collector_GetDeviceStreamEventServer
- type Collector_GetDeviceStreamReportClient
- type Collector_GetDeviceStreamReportServer
- type Empty
- type GetDeviceStreamEventReq
- func (*GetDeviceStreamEventReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetDeviceStreamEventReq) GetEventFilter() string
- func (x *GetDeviceStreamEventReq) GetId() uint64
- func (*GetDeviceStreamEventReq) ProtoMessage()
- func (x *GetDeviceStreamEventReq) ProtoReflect() protoreflect.Message
- func (x *GetDeviceStreamEventReq) Reset()
- func (x *GetDeviceStreamEventReq) String() string
- type GetDeviceStreamEventResp
- func (*GetDeviceStreamEventResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetDeviceStreamEventResp) GetMessage() string
- func (x *GetDeviceStreamEventResp) GetTopic() string
- func (*GetDeviceStreamEventResp) ProtoMessage()
- func (x *GetDeviceStreamEventResp) ProtoReflect() protoreflect.Message
- func (x *GetDeviceStreamEventResp) Reset()
- func (x *GetDeviceStreamEventResp) String() string
- type GetDeviceStreamReportReq
- func (*GetDeviceStreamReportReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetDeviceStreamReportReq) GetId() uint64
- func (*GetDeviceStreamReportReq) ProtoMessage()
- func (x *GetDeviceStreamReportReq) ProtoReflect() protoreflect.Message
- func (x *GetDeviceStreamReportReq) Reset()
- func (x *GetDeviceStreamReportReq) String() string
- type ReportImmediatelyReq
- func (*ReportImmediatelyReq) Descriptor() ([]byte, []int)deprecated
- func (x *ReportImmediatelyReq) GetId() uint64
- func (*ReportImmediatelyReq) ProtoMessage()
- func (x *ReportImmediatelyReq) ProtoReflect() protoreflect.Message
- func (x *ReportImmediatelyReq) Reset()
- func (x *ReportImmediatelyReq) String() string
- type SetReportIntervalReq
- func (*SetReportIntervalReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetReportIntervalReq) GetId() uint64
- func (x *SetReportIntervalReq) GetInterval() uint64
- func (*SetReportIntervalReq) ProtoMessage()
- func (x *SetReportIntervalReq) ProtoReflect() protoreflect.Message
- func (x *SetReportIntervalReq) Reset()
- func (x *SetReportIntervalReq) String() string
- type SetReportIntervalResp
- type UnimplementedCollectorServer
- func (UnimplementedCollectorServer) GetDeviceStreamEvent(*GetDeviceStreamEventReq, Collector_GetDeviceStreamEventServer) error
- func (UnimplementedCollectorServer) GetDeviceStreamReport(*GetDeviceStreamReportReq, Collector_GetDeviceStreamReportServer) error
- func (UnimplementedCollectorServer) ReportImmediately(context.Context, *ReportImmediatelyReq) (*Empty, error)
- func (UnimplementedCollectorServer) SetReportInterval(context.Context, *SetReportIntervalReq) (*SetReportIntervalResp, error)
- type UnsafeCollectorServer
Constants ¶
const ( Collector_ReportImmediately_FullMethodName = "/api.collector.Collector/ReportImmediately" Collector_SetReportInterval_FullMethodName = "/api.collector.Collector/SetReportInterval" Collector_GetDeviceStreamReport_FullMethodName = "/api.collector.Collector/GetDeviceStreamReport" Collector_GetDeviceStreamEvent_FullMethodName = "/api.collector.Collector/GetDeviceStreamEvent" )
const OperationCollectorReportImmediately = "/api.collector.Collector/ReportImmediately"
const OperationCollectorSetReportInterval = "/api.collector.Collector/SetReportInterval"
Variables ¶
var Collector_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.collector.Collector", HandlerType: (*CollectorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReportImmediately", Handler: _Collector_ReportImmediately_Handler, }, { MethodName: "SetReportInterval", Handler: _Collector_SetReportInterval_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetDeviceStreamReport", Handler: _Collector_GetDeviceStreamReport_Handler, ServerStreams: true, }, { StreamName: "GetDeviceStreamEvent", Handler: _Collector_GetDeviceStreamEvent_Handler, ServerStreams: true, }, }, Metadata: "collector/collector.proto", }
Collector_ServiceDesc is the grpc.ServiceDesc for Collector service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_collector_collector_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCollectorHTTPServer ¶
func RegisterCollectorHTTPServer(s *http.Server, srv CollectorHTTPServer)
func RegisterCollectorServer ¶
func RegisterCollectorServer(s grpc.ServiceRegistrar, srv CollectorServer)
Types ¶
type CollectorClient ¶
type CollectorClient interface { ReportImmediately(ctx context.Context, in *ReportImmediatelyReq, opts ...grpc.CallOption) (*Empty, error) SetReportInterval(ctx context.Context, in *SetReportIntervalReq, opts ...grpc.CallOption) (*SetReportIntervalResp, error) GetDeviceStreamReport(ctx context.Context, in *GetDeviceStreamReportReq, opts ...grpc.CallOption) (Collector_GetDeviceStreamReportClient, error) GetDeviceStreamEvent(ctx context.Context, in *GetDeviceStreamEventReq, opts ...grpc.CallOption) (Collector_GetDeviceStreamEventClient, error) }
CollectorClient is the client API for Collector 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 NewCollectorClient ¶
func NewCollectorClient(cc grpc.ClientConnInterface) CollectorClient
type CollectorHTTPClient ¶
type CollectorHTTPClient interface { ReportImmediately(ctx context.Context, req *ReportImmediatelyReq, opts ...http.CallOption) (rsp *Empty, err error) SetReportInterval(ctx context.Context, req *SetReportIntervalReq, opts ...http.CallOption) (rsp *SetReportIntervalResp, err error) }
func NewCollectorHTTPClient ¶
func NewCollectorHTTPClient(client *http.Client) CollectorHTTPClient
type CollectorHTTPClientImpl ¶
type CollectorHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CollectorHTTPClientImpl) ReportImmediately ¶
func (c *CollectorHTTPClientImpl) ReportImmediately(ctx context.Context, in *ReportImmediatelyReq, opts ...http.CallOption) (*Empty, error)
func (*CollectorHTTPClientImpl) SetReportInterval ¶
func (c *CollectorHTTPClientImpl) SetReportInterval(ctx context.Context, in *SetReportIntervalReq, opts ...http.CallOption) (*SetReportIntervalResp, error)
type CollectorHTTPServer ¶
type CollectorHTTPServer interface { ReportImmediately(context.Context, *ReportImmediatelyReq) (*Empty, error) SetReportInterval(context.Context, *SetReportIntervalReq) (*SetReportIntervalResp, error) }
type CollectorServer ¶
type CollectorServer interface { ReportImmediately(context.Context, *ReportImmediatelyReq) (*Empty, error) SetReportInterval(context.Context, *SetReportIntervalReq) (*SetReportIntervalResp, error) GetDeviceStreamReport(*GetDeviceStreamReportReq, Collector_GetDeviceStreamReportServer) error GetDeviceStreamEvent(*GetDeviceStreamEventReq, Collector_GetDeviceStreamEventServer) error // contains filtered or unexported methods }
CollectorServer is the server API for Collector service. All implementations must embed UnimplementedCollectorServer for forward compatibility
type Collector_GetDeviceStreamEventClient ¶ added in v0.2.3
type Collector_GetDeviceStreamEventClient interface { Recv() (*GetDeviceStreamEventResp, error) grpc.ClientStream }
type Collector_GetDeviceStreamEventServer ¶ added in v0.2.3
type Collector_GetDeviceStreamEventServer interface { Send(*GetDeviceStreamEventResp) error grpc.ServerStream }
type Collector_GetDeviceStreamReportClient ¶ added in v0.2.3
type Collector_GetDeviceStreamReportClient interface { Recv() (*collection.CollectionData, error) grpc.ClientStream }
type Collector_GetDeviceStreamReportServer ¶ added in v0.2.3
type Collector_GetDeviceStreamReportServer interface { Send(*collection.CollectionData) error grpc.ServerStream }
type Empty ¶ added in v0.2.3
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
added in
v0.2.3
func (*Empty) ProtoMessage ¶ added in v0.2.3
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶ added in v0.2.3
func (x *Empty) ProtoReflect() protoreflect.Message
type GetDeviceStreamEventReq ¶ added in v0.2.3
type GetDeviceStreamEventReq struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" form:"id" binding:"required"` // @gotags: form:"id" binding:"required" EventFilter string `protobuf:"bytes,2,opt,name=event_filter,json=eventFilter,proto3" json:"eventFilter" form:"eventFilter"` // @gotags: form:"eventFilter" json:"eventFilter" // contains filtered or unexported fields }
func (*GetDeviceStreamEventReq) Descriptor
deprecated
added in
v0.2.3
func (*GetDeviceStreamEventReq) Descriptor() ([]byte, []int)
Deprecated: Use GetDeviceStreamEventReq.ProtoReflect.Descriptor instead.
func (*GetDeviceStreamEventReq) GetEventFilter ¶ added in v0.2.3
func (x *GetDeviceStreamEventReq) GetEventFilter() string
func (*GetDeviceStreamEventReq) GetId ¶ added in v0.2.3
func (x *GetDeviceStreamEventReq) GetId() uint64
func (*GetDeviceStreamEventReq) ProtoMessage ¶ added in v0.2.3
func (*GetDeviceStreamEventReq) ProtoMessage()
func (*GetDeviceStreamEventReq) ProtoReflect ¶ added in v0.2.3
func (x *GetDeviceStreamEventReq) ProtoReflect() protoreflect.Message
func (*GetDeviceStreamEventReq) Reset ¶ added in v0.2.3
func (x *GetDeviceStreamEventReq) Reset()
func (*GetDeviceStreamEventReq) String ¶ added in v0.2.3
func (x *GetDeviceStreamEventReq) String() string
type GetDeviceStreamEventResp ¶ added in v0.2.3
type GetDeviceStreamEventResp struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic"` // @gotags: json:"topic" Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message"` // @gotags: json:"message" // contains filtered or unexported fields }
func (*GetDeviceStreamEventResp) Descriptor
deprecated
added in
v0.2.3
func (*GetDeviceStreamEventResp) Descriptor() ([]byte, []int)
Deprecated: Use GetDeviceStreamEventResp.ProtoReflect.Descriptor instead.
func (*GetDeviceStreamEventResp) GetMessage ¶ added in v0.2.3
func (x *GetDeviceStreamEventResp) GetMessage() string
func (*GetDeviceStreamEventResp) GetTopic ¶ added in v0.2.3
func (x *GetDeviceStreamEventResp) GetTopic() string
func (*GetDeviceStreamEventResp) ProtoMessage ¶ added in v0.2.3
func (*GetDeviceStreamEventResp) ProtoMessage()
func (*GetDeviceStreamEventResp) ProtoReflect ¶ added in v0.2.3
func (x *GetDeviceStreamEventResp) ProtoReflect() protoreflect.Message
func (*GetDeviceStreamEventResp) Reset ¶ added in v0.2.3
func (x *GetDeviceStreamEventResp) Reset()
func (*GetDeviceStreamEventResp) String ¶ added in v0.2.3
func (x *GetDeviceStreamEventResp) String() string
type GetDeviceStreamReportReq ¶ added in v0.2.3
type GetDeviceStreamReportReq struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" form:"id" binding:"required"` // @gotags: form:"id" binding:"required" // contains filtered or unexported fields }
func (*GetDeviceStreamReportReq) Descriptor
deprecated
added in
v0.2.3
func (*GetDeviceStreamReportReq) Descriptor() ([]byte, []int)
Deprecated: Use GetDeviceStreamReportReq.ProtoReflect.Descriptor instead.
func (*GetDeviceStreamReportReq) GetId ¶ added in v0.2.3
func (x *GetDeviceStreamReportReq) GetId() uint64
func (*GetDeviceStreamReportReq) ProtoMessage ¶ added in v0.2.3
func (*GetDeviceStreamReportReq) ProtoMessage()
func (*GetDeviceStreamReportReq) ProtoReflect ¶ added in v0.2.3
func (x *GetDeviceStreamReportReq) ProtoReflect() protoreflect.Message
func (*GetDeviceStreamReportReq) Reset ¶ added in v0.2.3
func (x *GetDeviceStreamReportReq) Reset()
func (*GetDeviceStreamReportReq) String ¶ added in v0.2.3
func (x *GetDeviceStreamReportReq) String() string
type ReportImmediatelyReq ¶
type ReportImmediatelyReq struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ReportImmediatelyReq) Descriptor
deprecated
func (*ReportImmediatelyReq) Descriptor() ([]byte, []int)
Deprecated: Use ReportImmediatelyReq.ProtoReflect.Descriptor instead.
func (*ReportImmediatelyReq) GetId ¶
func (x *ReportImmediatelyReq) GetId() uint64
func (*ReportImmediatelyReq) ProtoMessage ¶
func (*ReportImmediatelyReq) ProtoMessage()
func (*ReportImmediatelyReq) ProtoReflect ¶
func (x *ReportImmediatelyReq) ProtoReflect() protoreflect.Message
func (*ReportImmediatelyReq) Reset ¶
func (x *ReportImmediatelyReq) Reset()
func (*ReportImmediatelyReq) String ¶
func (x *ReportImmediatelyReq) String() string
type SetReportIntervalReq ¶
type SetReportIntervalReq struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` // contains filtered or unexported fields }
func (*SetReportIntervalReq) Descriptor
deprecated
func (*SetReportIntervalReq) Descriptor() ([]byte, []int)
Deprecated: Use SetReportIntervalReq.ProtoReflect.Descriptor instead.
func (*SetReportIntervalReq) GetId ¶
func (x *SetReportIntervalReq) GetId() uint64
func (*SetReportIntervalReq) GetInterval ¶
func (x *SetReportIntervalReq) GetInterval() uint64
func (*SetReportIntervalReq) ProtoMessage ¶
func (*SetReportIntervalReq) ProtoMessage()
func (*SetReportIntervalReq) ProtoReflect ¶
func (x *SetReportIntervalReq) ProtoReflect() protoreflect.Message
func (*SetReportIntervalReq) Reset ¶
func (x *SetReportIntervalReq) Reset()
func (*SetReportIntervalReq) String ¶
func (x *SetReportIntervalReq) String() string
type SetReportIntervalResp ¶
type SetReportIntervalResp struct {
// contains filtered or unexported fields
}
func (*SetReportIntervalResp) Descriptor
deprecated
func (*SetReportIntervalResp) Descriptor() ([]byte, []int)
Deprecated: Use SetReportIntervalResp.ProtoReflect.Descriptor instead.
func (*SetReportIntervalResp) ProtoMessage ¶
func (*SetReportIntervalResp) ProtoMessage()
func (*SetReportIntervalResp) ProtoReflect ¶
func (x *SetReportIntervalResp) ProtoReflect() protoreflect.Message
func (*SetReportIntervalResp) Reset ¶
func (x *SetReportIntervalResp) Reset()
func (*SetReportIntervalResp) String ¶
func (x *SetReportIntervalResp) String() string
type UnimplementedCollectorServer ¶
type UnimplementedCollectorServer struct { }
UnimplementedCollectorServer must be embedded to have forward compatible implementations.
func (UnimplementedCollectorServer) GetDeviceStreamEvent ¶ added in v0.2.3
func (UnimplementedCollectorServer) GetDeviceStreamEvent(*GetDeviceStreamEventReq, Collector_GetDeviceStreamEventServer) error
func (UnimplementedCollectorServer) GetDeviceStreamReport ¶ added in v0.2.3
func (UnimplementedCollectorServer) GetDeviceStreamReport(*GetDeviceStreamReportReq, Collector_GetDeviceStreamReportServer) error
func (UnimplementedCollectorServer) ReportImmediately ¶
func (UnimplementedCollectorServer) ReportImmediately(context.Context, *ReportImmediatelyReq) (*Empty, error)
func (UnimplementedCollectorServer) SetReportInterval ¶
func (UnimplementedCollectorServer) SetReportInterval(context.Context, *SetReportIntervalReq) (*SetReportIntervalResp, error)
type UnsafeCollectorServer ¶
type UnsafeCollectorServer interface {
// contains filtered or unexported methods
}
UnsafeCollectorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectorServer will result in compilation errors.