Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer)
- type CollectorServiceClient
- type CollectorServiceServer
- type Reading
- func (*Reading) Descriptor() ([]byte, []int)deprecated
- func (x *Reading) GetReadings() []*SensorReading
- func (x *Reading) GetRecordedAt() *timestamppb.Timestamp
- func (x *Reading) GetSensor() *Sensor
- func (*Reading) ProtoMessage()
- func (x *Reading) ProtoReflect() protoreflect.Message
- func (x *Reading) Reset()
- func (x *Reading) String() string
- type RecordRequest
- type RecordResponse
- func (*RecordResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RecordResponse) GetRecordedAt() *timestamppb.Timestamp
- func (x *RecordResponse) GetSessionId() string
- func (*RecordResponse) ProtoMessage()
- func (x *RecordResponse) ProtoReflect() protoreflect.Message
- func (x *RecordResponse) Reset()
- func (x *RecordResponse) String() string
- type Sensor
- func (*Sensor) Descriptor() ([]byte, []int)deprecated
- func (x *Sensor) GetManufacturer() string
- func (x *Sensor) GetName() string
- func (x *Sensor) GetSensorCount() int32
- func (x *Sensor) GetSensorId() string
- func (x *Sensor) GetTemperatureUnit() string
- func (*Sensor) ProtoMessage()
- func (x *Sensor) ProtoReflect() protoreflect.Message
- func (x *Sensor) Reset()
- func (x *Sensor) String() string
- type SensorReading
- func (*SensorReading) Descriptor() ([]byte, []int)deprecated
- func (x *SensorReading) GetSensorNumber() int32
- func (x *SensorReading) GetTemperature() float32
- func (*SensorReading) ProtoMessage()
- func (x *SensorReading) ProtoReflect() protoreflect.Message
- func (x *SensorReading) Reset()
- func (x *SensorReading) String() string
- type Session
- type SessionRequest
- type SessionResponse
- type UnimplementedCollectorServiceServer
- type UnsafeCollectorServiceServer
Constants ¶
const ( CollectorService_Record_FullMethodName = "/bbq.collector.v1.CollectorService/Record" CollectorService_Session_FullMethodName = "/bbq.collector.v1.CollectorService/Session" )
Variables ¶
var CollectorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bbq.collector.v1.CollectorService", HandlerType: (*CollectorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Record", Handler: _CollectorService_Record_Handler, }, { MethodName: "Session", Handler: _CollectorService_Session_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "bbq/collector/v1/collector_service.proto", }
CollectorService_ServiceDesc is the grpc.ServiceDesc for CollectorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_bbq_collector_v1_bbq_proto protoreflect.FileDescriptor
var File_bbq_collector_v1_collector_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCollectorServiceServer ¶
func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer)
Types ¶
type CollectorServiceClient ¶
type CollectorServiceClient interface { Record(ctx context.Context, in *RecordRequest, opts ...grpc.CallOption) (*RecordResponse, error) Session(ctx context.Context, in *SessionRequest, opts ...grpc.CallOption) (*SessionResponse, error) }
CollectorServiceClient is the client API for CollectorService 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 NewCollectorServiceClient ¶
func NewCollectorServiceClient(cc grpc.ClientConnInterface) CollectorServiceClient
type CollectorServiceServer ¶
type CollectorServiceServer interface { Record(context.Context, *RecordRequest) (*RecordResponse, error) Session(context.Context, *SessionRequest) (*SessionResponse, error) // contains filtered or unexported methods }
CollectorServiceServer is the server API for CollectorService service. All implementations must embed UnimplementedCollectorServiceServer for forward compatibility
type Reading ¶
type Reading struct { Sensor *Sensor `protobuf:"bytes,1,opt,name=sensor,proto3" json:"sensor,omitempty"` Readings []*SensorReading `protobuf:"bytes,2,rep,name=readings,proto3" json:"readings,omitempty"` RecordedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=recorded_at,json=recordedAt,proto3" json:"recorded_at,omitempty"` // contains filtered or unexported fields }
func (*Reading) Descriptor
deprecated
func (*Reading) GetReadings ¶
func (x *Reading) GetReadings() []*SensorReading
func (*Reading) GetRecordedAt ¶
func (x *Reading) GetRecordedAt() *timestamppb.Timestamp
func (*Reading) ProtoMessage ¶
func (*Reading) ProtoMessage()
func (*Reading) ProtoReflect ¶
func (x *Reading) ProtoReflect() protoreflect.Message
type RecordRequest ¶
type RecordRequest struct { Reading *Reading `protobuf:"bytes,1,opt,name=reading,proto3" json:"reading,omitempty"` // contains filtered or unexported fields }
func (*RecordRequest) Descriptor
deprecated
func (*RecordRequest) Descriptor() ([]byte, []int)
Deprecated: Use RecordRequest.ProtoReflect.Descriptor instead.
func (*RecordRequest) GetReading ¶
func (x *RecordRequest) GetReading() *Reading
func (*RecordRequest) ProtoMessage ¶
func (*RecordRequest) ProtoMessage()
func (*RecordRequest) ProtoReflect ¶
func (x *RecordRequest) ProtoReflect() protoreflect.Message
func (*RecordRequest) Reset ¶
func (x *RecordRequest) Reset()
func (*RecordRequest) String ¶
func (x *RecordRequest) String() string
type RecordResponse ¶
type RecordResponse struct { SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` RecordedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=recorded_at,json=recordedAt,proto3" json:"recorded_at,omitempty"` // contains filtered or unexported fields }
func (*RecordResponse) Descriptor
deprecated
func (*RecordResponse) Descriptor() ([]byte, []int)
Deprecated: Use RecordResponse.ProtoReflect.Descriptor instead.
func (*RecordResponse) GetRecordedAt ¶
func (x *RecordResponse) GetRecordedAt() *timestamppb.Timestamp
func (*RecordResponse) GetSessionId ¶
func (x *RecordResponse) GetSessionId() string
func (*RecordResponse) ProtoMessage ¶
func (*RecordResponse) ProtoMessage()
func (*RecordResponse) ProtoReflect ¶
func (x *RecordResponse) ProtoReflect() protoreflect.Message
func (*RecordResponse) Reset ¶
func (x *RecordResponse) Reset()
func (*RecordResponse) String ¶
func (x *RecordResponse) String() string
type Sensor ¶
type Sensor struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Manufacturer string `protobuf:"bytes,2,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` SensorCount int32 `protobuf:"varint,3,opt,name=sensor_count,json=sensorCount,proto3" json:"sensor_count,omitempty"` TemperatureUnit string `protobuf:"bytes,4,opt,name=temperature_unit,json=temperatureUnit,proto3" json:"temperature_unit,omitempty"` SensorId string `protobuf:"bytes,5,opt,name=sensor_id,json=sensorId,proto3" json:"sensor_id,omitempty"` // contains filtered or unexported fields }
func (*Sensor) Descriptor
deprecated
func (*Sensor) GetManufacturer ¶
func (*Sensor) GetSensorCount ¶
func (*Sensor) GetSensorId ¶
func (*Sensor) GetTemperatureUnit ¶
func (*Sensor) ProtoMessage ¶
func (*Sensor) ProtoMessage()
func (*Sensor) ProtoReflect ¶
func (x *Sensor) ProtoReflect() protoreflect.Message
type SensorReading ¶
type SensorReading struct { SensorNumber int32 `protobuf:"varint,1,opt,name=sensor_number,json=sensorNumber,proto3" json:"sensor_number,omitempty"` Temperature float32 `protobuf:"fixed32,2,opt,name=temperature,proto3" json:"temperature,omitempty"` // contains filtered or unexported fields }
func (*SensorReading) Descriptor
deprecated
func (*SensorReading) Descriptor() ([]byte, []int)
Deprecated: Use SensorReading.ProtoReflect.Descriptor instead.
func (*SensorReading) GetSensorNumber ¶
func (x *SensorReading) GetSensorNumber() int32
func (*SensorReading) GetTemperature ¶
func (x *SensorReading) GetTemperature() float32
func (*SensorReading) ProtoMessage ¶
func (*SensorReading) ProtoMessage()
func (*SensorReading) ProtoReflect ¶
func (x *SensorReading) ProtoReflect() protoreflect.Message
func (*SensorReading) Reset ¶
func (x *SensorReading) Reset()
func (*SensorReading) String ¶
func (x *SensorReading) String() string
type Session ¶
type Session struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type SessionRequest ¶
type SessionRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*SessionRequest) Descriptor
deprecated
func (*SessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use SessionRequest.ProtoReflect.Descriptor instead.
func (*SessionRequest) GetName ¶
func (x *SessionRequest) GetName() string
func (*SessionRequest) ProtoMessage ¶
func (*SessionRequest) ProtoMessage()
func (*SessionRequest) ProtoReflect ¶
func (x *SessionRequest) ProtoReflect() protoreflect.Message
func (*SessionRequest) Reset ¶
func (x *SessionRequest) Reset()
func (*SessionRequest) String ¶
func (x *SessionRequest) String() string
type SessionResponse ¶
type SessionResponse struct { Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` // contains filtered or unexported fields }
func (*SessionResponse) Descriptor
deprecated
func (*SessionResponse) Descriptor() ([]byte, []int)
Deprecated: Use SessionResponse.ProtoReflect.Descriptor instead.
func (*SessionResponse) GetSession ¶
func (x *SessionResponse) GetSession() *Session
func (*SessionResponse) ProtoMessage ¶
func (*SessionResponse) ProtoMessage()
func (*SessionResponse) ProtoReflect ¶
func (x *SessionResponse) ProtoReflect() protoreflect.Message
func (*SessionResponse) Reset ¶
func (x *SessionResponse) Reset()
func (*SessionResponse) String ¶
func (x *SessionResponse) String() string
type UnimplementedCollectorServiceServer ¶
type UnimplementedCollectorServiceServer struct { }
UnimplementedCollectorServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCollectorServiceServer) Record ¶
func (UnimplementedCollectorServiceServer) Record(context.Context, *RecordRequest) (*RecordResponse, error)
func (UnimplementedCollectorServiceServer) Session ¶
func (UnimplementedCollectorServiceServer) Session(context.Context, *SessionRequest) (*SessionResponse, error)
type UnsafeCollectorServiceServer ¶
type UnsafeCollectorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCollectorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectorServiceServer will result in compilation errors.