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 Empty
- 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
- type UnsafeCollectorServer
Constants ¶
const ( Collector_ReportImmediately_FullMethodName = "/api.collector.Collector/ReportImmediately" Collector_SetReportInterval_FullMethodName = "/api.collector.Collector/SetReportInterval" )
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{}, 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) }
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) // contains filtered or unexported methods }
CollectorServer is the server API for Collector service. All implementations must embed UnimplementedCollectorServer for forward compatibility
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 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) 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.