Added support for remote0
This commit is contained in:
126
pkg/service/grpc.go
Normal file
126
pkg/service/grpc.go
Normal file
@@ -0,0 +1,126 @@
|
||||
package hwsensorsservice
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/shayne/hwinfo-streamdeck/pkg/service/proto"
|
||||
)
|
||||
|
||||
// GRPCClient is an implementation of KV that talks over RPC.
|
||||
type GRPCClient struct {
|
||||
Client proto.HWServiceClient
|
||||
}
|
||||
|
||||
// PollTime rpc call
|
||||
func (c *GRPCClient) PollTime() (uint64, error) {
|
||||
resp, err := c.Client.PollTime(context.Background(), &empty.Empty{})
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return resp.GetPollTime(), nil
|
||||
}
|
||||
|
||||
// Sensors implementation
|
||||
func (c *GRPCClient) Sensors() ([]Sensor, error) {
|
||||
stream, err := c.Client.Sensors(context.Background(), &empty.Empty{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var sensors []Sensor
|
||||
for {
|
||||
s, err := stream.Recv()
|
||||
if errors.Is(err, io.EOF) {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sensors = append(sensors, &sensor{s})
|
||||
}
|
||||
|
||||
return sensors, nil
|
||||
}
|
||||
|
||||
// ReadingsForSensorID implementation
|
||||
func (c *GRPCClient) ReadingsForSensorID(id string) ([]Reading, error) {
|
||||
stream, err := c.Client.ReadingsForSensorID(context.Background(), &proto.SensorIDRequest{Id: id})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var readings []Reading
|
||||
for {
|
||||
r, err := stream.Recv()
|
||||
if errors.Is(err, io.EOF) {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
readings = append(readings, &reading{r})
|
||||
}
|
||||
|
||||
return readings, nil
|
||||
}
|
||||
|
||||
// GRPCServer is the gRPC server that GRPCClient talks to.
|
||||
type GRPCServer struct {
|
||||
// This is the real implementation
|
||||
Impl HardwareService
|
||||
proto.UnimplementedHWServiceServer
|
||||
}
|
||||
|
||||
// PollTime gRPC wrapper
|
||||
func (s *GRPCServer) PollTime(ctx context.Context, _ *empty.Empty) (*proto.PollTimeReply, error) {
|
||||
v, err := s.Impl.PollTime()
|
||||
return &proto.PollTimeReply{PollTime: v}, err
|
||||
}
|
||||
|
||||
// Sensors gRPC wrapper
|
||||
func (s *GRPCServer) Sensors(_ *empty.Empty, stream proto.HWService_SensorsServer) error {
|
||||
sensors, err := s.Impl.Sensors()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, sensor := range sensors {
|
||||
if err := stream.Send(&proto.Sensor{
|
||||
ID: sensor.ID(),
|
||||
Name: sensor.Name(),
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ReadingsForSensorID gRPC wrapper
|
||||
func (s *GRPCServer) ReadingsForSensorID(req *proto.SensorIDRequest, stream proto.HWService_ReadingsForSensorIDServer) error {
|
||||
readings, err := s.Impl.ReadingsForSensorID(req.GetId())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, reading := range readings {
|
||||
if err := stream.Send(&proto.Reading{
|
||||
ID: reading.ID(),
|
||||
TypeI: reading.TypeI(),
|
||||
Type: reading.Type(),
|
||||
Label: reading.Label(),
|
||||
Unit: reading.Unit(),
|
||||
Value: reading.Value(),
|
||||
ValueMin: reading.ValueMin(),
|
||||
ValueMax: reading.ValueMax(),
|
||||
ValueAvg: reading.ValueAvg(),
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
149
pkg/service/interface.go
Normal file
149
pkg/service/interface.go
Normal file
@@ -0,0 +1,149 @@
|
||||
package hwsensorsservice
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/hashicorp/go-plugin"
|
||||
"github.com/shayne/hwinfo-streamdeck/pkg/service/proto"
|
||||
)
|
||||
|
||||
// Handshake is a common handshake that is shared by plugin and host.
|
||||
var Handshake = plugin.HandshakeConfig{
|
||||
// This isn't required when using VersionedPlugins
|
||||
ProtocolVersion: 1,
|
||||
MagicCookieKey: "BASIC_PLUGIN",
|
||||
MagicCookieValue: "hello",
|
||||
}
|
||||
|
||||
// PluginMap is the map of plugins we can dispense.
|
||||
var PluginMap = map[string]plugin.Plugin{
|
||||
"hwinfoplugin": &HardwareServicePlugin{},
|
||||
}
|
||||
|
||||
// HardwareService is the interface that we're exposing as a plugin.
|
||||
type HardwareService interface {
|
||||
PollTime() (uint64, error)
|
||||
Sensors() ([]Sensor, error)
|
||||
ReadingsForSensorID(id string) ([]Reading, error)
|
||||
}
|
||||
|
||||
// HardwareServicePlugin is the implementation of plugin.GRPCPlugin so we can serve/consume this.
|
||||
type HardwareServicePlugin struct {
|
||||
// GRPCPlugin must still implement the Plugin interface
|
||||
plugin.Plugin
|
||||
// Concrete implementation, written in Go. This is only used for plugins
|
||||
// that are written in Go.
|
||||
Impl HardwareService
|
||||
}
|
||||
|
||||
// GRPCServer constructor
|
||||
func (p *HardwareServicePlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
|
||||
proto.RegisterHWServiceServer(s, &GRPCServer{Impl: p.Impl})
|
||||
return nil
|
||||
}
|
||||
|
||||
// GRPCClient constructor
|
||||
func (p *HardwareServicePlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
|
||||
return &GRPCClient{Client: proto.NewHWServiceClient(c)}, nil
|
||||
}
|
||||
|
||||
// Sensor is the common hardware interface for a sensor
|
||||
type Sensor interface {
|
||||
ID() string
|
||||
Name() string
|
||||
}
|
||||
|
||||
// ReadingType enum of value/unit type for reading
|
||||
type ReadingType int
|
||||
|
||||
const (
|
||||
// ReadingTypeNone no type
|
||||
ReadingTypeNone ReadingType = iota
|
||||
// ReadingTypeTemp temperature in celsius
|
||||
ReadingTypeTemp
|
||||
// ReadingTypeVolt voltage
|
||||
ReadingTypeVolt
|
||||
// ReadingTypeFan RPM
|
||||
ReadingTypeFan
|
||||
// ReadingTypeCurrent amps
|
||||
ReadingTypeCurrent
|
||||
// ReadingTypePower watts
|
||||
ReadingTypePower
|
||||
// ReadingTypeClock Mhz
|
||||
ReadingTypeClock
|
||||
// ReadingTypeUsage e.g. MBs
|
||||
ReadingTypeUsage
|
||||
// ReadingTypeOther other
|
||||
ReadingTypeOther
|
||||
)
|
||||
|
||||
func (t ReadingType) String() string {
|
||||
return [...]string{"None", "Temp", "Volt", "Fan", "Current", "Power", "Clock", "Usage", "Other"}[t]
|
||||
}
|
||||
|
||||
// Reading is the common hardware interface for a sensor's reading
|
||||
type Reading interface {
|
||||
ID() int32
|
||||
TypeI() int32
|
||||
Type() string
|
||||
Label() string
|
||||
Unit() string
|
||||
Value() float64
|
||||
ValueMin() float64
|
||||
ValueMax() float64
|
||||
ValueAvg() float64
|
||||
}
|
||||
|
||||
type sensor struct {
|
||||
*proto.Sensor
|
||||
}
|
||||
|
||||
func (s sensor) ID() string {
|
||||
return s.Sensor.GetID()
|
||||
}
|
||||
|
||||
func (s sensor) Name() string {
|
||||
return s.Sensor.GetName()
|
||||
}
|
||||
|
||||
type reading struct {
|
||||
*proto.Reading
|
||||
}
|
||||
|
||||
func (r reading) ID() int32 {
|
||||
return r.Reading.GetID()
|
||||
}
|
||||
|
||||
func (r reading) Label() string {
|
||||
return r.Reading.GetLabel()
|
||||
}
|
||||
|
||||
func (r reading) Type() string {
|
||||
return r.Reading.GetType()
|
||||
}
|
||||
|
||||
func (r reading) TypeI() int32 {
|
||||
return r.Reading.GetTypeI()
|
||||
}
|
||||
|
||||
func (r reading) Unit() string {
|
||||
return r.Reading.GetUnit()
|
||||
}
|
||||
|
||||
func (r reading) Value() float64 {
|
||||
return r.Reading.GetValue()
|
||||
}
|
||||
|
||||
func (r reading) ValueMin() float64 {
|
||||
return r.Reading.GetValueMin()
|
||||
}
|
||||
|
||||
func (r reading) ValueMax() float64 {
|
||||
return r.Reading.GetValueMax()
|
||||
}
|
||||
|
||||
func (r reading) ValueAvg() float64 {
|
||||
return r.Reading.GetValueAvg()
|
||||
}
|
||||
439
pkg/service/proto/hwservice.pb.go
Normal file
439
pkg/service/proto/hwservice.pb.go
Normal file
@@ -0,0 +1,439 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: pkg/service/proto/hwservice.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type PollTimeReply struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PollTime uint64 `protobuf:"varint,1,opt,name=pollTime,proto3" json:"pollTime,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PollTimeReply) Reset() {
|
||||
*x = PollTimeReply{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PollTimeReply) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PollTimeReply) ProtoMessage() {}
|
||||
|
||||
func (x *PollTimeReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PollTimeReply.ProtoReflect.Descriptor instead.
|
||||
func (*PollTimeReply) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_service_proto_hwservice_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PollTimeReply) GetPollTime() uint64 {
|
||||
if x != nil {
|
||||
return x.PollTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Sensor struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Sensor) Reset() {
|
||||
*x = Sensor{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Sensor) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Sensor) ProtoMessage() {}
|
||||
|
||||
func (x *Sensor) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Sensor.ProtoReflect.Descriptor instead.
|
||||
func (*Sensor) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_service_proto_hwservice_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Sensor) GetID() string {
|
||||
if x != nil {
|
||||
return x.ID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Sensor) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SensorIDRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SensorIDRequest) Reset() {
|
||||
*x = SensorIDRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SensorIDRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SensorIDRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SensorIDRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SensorIDRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SensorIDRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_service_proto_hwservice_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SensorIDRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Reading struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
||||
TypeI int32 `protobuf:"varint,2,opt,name=typeI,proto3" json:"typeI,omitempty"`
|
||||
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
|
||||
Unit string `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"`
|
||||
Value float64 `protobuf:"fixed64,6,opt,name=value,proto3" json:"value,omitempty"`
|
||||
ValueMin float64 `protobuf:"fixed64,7,opt,name=valueMin,proto3" json:"valueMin,omitempty"`
|
||||
ValueMax float64 `protobuf:"fixed64,8,opt,name=valueMax,proto3" json:"valueMax,omitempty"`
|
||||
ValueAvg float64 `protobuf:"fixed64,9,opt,name=valueAvg,proto3" json:"valueAvg,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Reading) Reset() {
|
||||
*x = Reading{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Reading) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Reading) ProtoMessage() {}
|
||||
|
||||
func (x *Reading) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_service_proto_hwservice_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Reading.ProtoReflect.Descriptor instead.
|
||||
func (*Reading) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_service_proto_hwservice_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Reading) GetID() int32 {
|
||||
if x != nil {
|
||||
return x.ID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Reading) GetTypeI() int32 {
|
||||
if x != nil {
|
||||
return x.TypeI
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Reading) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Reading) GetLabel() string {
|
||||
if x != nil {
|
||||
return x.Label
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Reading) GetUnit() string {
|
||||
if x != nil {
|
||||
return x.Unit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Reading) GetValue() float64 {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Reading) GetValueMin() float64 {
|
||||
if x != nil {
|
||||
return x.ValueMin
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Reading) GetValueMax() float64 {
|
||||
if x != nil {
|
||||
return x.ValueMax
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Reading) GetValueAvg() float64 {
|
||||
if x != nil {
|
||||
return x.ValueAvg
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_pkg_service_proto_hwservice_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pkg_service_proto_hwservice_proto_rawDesc = []byte{
|
||||
0x0a, 0x21, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x77, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74,
|
||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x0d, 0x50, 0x6f, 0x6c, 0x6c, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x6c,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x6c,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x22, 0x2c, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x22, 0x21, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x49, 0x44, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xd7, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e,
|
||||
0x67, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49,
|
||||
0x44, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x49, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x49, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c,
|
||||
0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65,
|
||||
0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x4d, 0x61, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x4d, 0x61, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x76, 0x67, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x76, 0x67, 0x32,
|
||||
0xc0, 0x01, 0x0a, 0x09, 0x48, 0x57, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a,
|
||||
0x08, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
|
||||
0x79, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x07, 0x53, 0x65, 0x6e,
|
||||
0x73, 0x6f, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x22, 0x00, 0x30, 0x01, 0x12,
|
||||
0x41, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65,
|
||||
0x6e, 0x73, 0x6f, 0x72, 0x49, 0x44, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53,
|
||||
0x65, 0x6e, 0x73, 0x6f, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x00,
|
||||
0x30, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x73, 0x68, 0x61, 0x79, 0x6e, 0x65, 0x2f, 0x68, 0x77, 0x69, 0x6e, 0x66, 0x6f, 0x2d, 0x73,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x64, 0x65, 0x63, 0x6b, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_pkg_service_proto_hwservice_proto_rawDescOnce sync.Once
|
||||
file_pkg_service_proto_hwservice_proto_rawDescData = file_pkg_service_proto_hwservice_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_pkg_service_proto_hwservice_proto_rawDescGZIP() []byte {
|
||||
file_pkg_service_proto_hwservice_proto_rawDescOnce.Do(func() {
|
||||
file_pkg_service_proto_hwservice_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_service_proto_hwservice_proto_rawDescData)
|
||||
})
|
||||
return file_pkg_service_proto_hwservice_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pkg_service_proto_hwservice_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_pkg_service_proto_hwservice_proto_goTypes = []interface{}{
|
||||
(*PollTimeReply)(nil), // 0: proto.PollTimeReply
|
||||
(*Sensor)(nil), // 1: proto.Sensor
|
||||
(*SensorIDRequest)(nil), // 2: proto.SensorIDRequest
|
||||
(*Reading)(nil), // 3: proto.Reading
|
||||
(*emptypb.Empty)(nil), // 4: google.protobuf.Empty
|
||||
}
|
||||
var file_pkg_service_proto_hwservice_proto_depIdxs = []int32{
|
||||
4, // 0: proto.HWService.PollTime:input_type -> google.protobuf.Empty
|
||||
4, // 1: proto.HWService.Sensors:input_type -> google.protobuf.Empty
|
||||
2, // 2: proto.HWService.ReadingsForSensorID:input_type -> proto.SensorIDRequest
|
||||
0, // 3: proto.HWService.PollTime:output_type -> proto.PollTimeReply
|
||||
1, // 4: proto.HWService.Sensors:output_type -> proto.Sensor
|
||||
3, // 5: proto.HWService.ReadingsForSensorID:output_type -> proto.Reading
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pkg_service_proto_hwservice_proto_init() }
|
||||
func file_pkg_service_proto_hwservice_proto_init() {
|
||||
if File_pkg_service_proto_hwservice_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_pkg_service_proto_hwservice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PollTimeReply); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_service_proto_hwservice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Sensor); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_service_proto_hwservice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SensorIDRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_service_proto_hwservice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Reading); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pkg_service_proto_hwservice_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_pkg_service_proto_hwservice_proto_goTypes,
|
||||
DependencyIndexes: file_pkg_service_proto_hwservice_proto_depIdxs,
|
||||
MessageInfos: file_pkg_service_proto_hwservice_proto_msgTypes,
|
||||
}.Build()
|
||||
File_pkg_service_proto_hwservice_proto = out.File
|
||||
file_pkg_service_proto_hwservice_proto_rawDesc = nil
|
||||
file_pkg_service_proto_hwservice_proto_goTypes = nil
|
||||
file_pkg_service_proto_hwservice_proto_depIdxs = nil
|
||||
}
|
||||
34
pkg/service/proto/hwservice.proto
Normal file
34
pkg/service/proto/hwservice.proto
Normal file
@@ -0,0 +1,34 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "github.com/shayne/hwinfo-streamdeck/pkg/service/proto";
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
package proto;
|
||||
|
||||
service HWService {
|
||||
rpc PollTime(google.protobuf.Empty) returns (PollTimeReply) {}
|
||||
rpc Sensors(google.protobuf.Empty) returns (stream Sensor) {}
|
||||
rpc ReadingsForSensorID(SensorIDRequest) returns (stream Reading) {}
|
||||
}
|
||||
|
||||
message PollTimeReply { uint64 pollTime = 1; }
|
||||
|
||||
message Sensor {
|
||||
string ID = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message SensorIDRequest { string id = 1; }
|
||||
|
||||
message Reading {
|
||||
int32 ID = 1;
|
||||
int32 typeI = 2;
|
||||
string type = 3;
|
||||
string label = 4;
|
||||
string unit = 5;
|
||||
double value = 6;
|
||||
double valueMin = 7;
|
||||
double valueMax = 8;
|
||||
double valueAvg = 9;
|
||||
}
|
||||
233
pkg/service/proto/hwservice_grpc.pb.go
Normal file
233
pkg/service/proto/hwservice_grpc.pb.go
Normal file
@@ -0,0 +1,233 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.12
|
||||
// source: pkg/service/proto/hwservice.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// HWServiceClient is the client API for HWService 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.
|
||||
type HWServiceClient interface {
|
||||
PollTime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PollTimeReply, error)
|
||||
Sensors(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (HWService_SensorsClient, error)
|
||||
ReadingsForSensorID(ctx context.Context, in *SensorIDRequest, opts ...grpc.CallOption) (HWService_ReadingsForSensorIDClient, error)
|
||||
}
|
||||
|
||||
type hWServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHWServiceClient(cc grpc.ClientConnInterface) HWServiceClient {
|
||||
return &hWServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *hWServiceClient) PollTime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PollTimeReply, error) {
|
||||
out := new(PollTimeReply)
|
||||
err := c.cc.Invoke(ctx, "/proto.HWService/PollTime", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hWServiceClient) Sensors(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (HWService_SensorsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &HWService_ServiceDesc.Streams[0], "/proto.HWService/Sensors", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &hWServiceSensorsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type HWService_SensorsClient interface {
|
||||
Recv() (*Sensor, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type hWServiceSensorsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *hWServiceSensorsClient) Recv() (*Sensor, error) {
|
||||
m := new(Sensor)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *hWServiceClient) ReadingsForSensorID(ctx context.Context, in *SensorIDRequest, opts ...grpc.CallOption) (HWService_ReadingsForSensorIDClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &HWService_ServiceDesc.Streams[1], "/proto.HWService/ReadingsForSensorID", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &hWServiceReadingsForSensorIDClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type HWService_ReadingsForSensorIDClient interface {
|
||||
Recv() (*Reading, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type hWServiceReadingsForSensorIDClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *hWServiceReadingsForSensorIDClient) Recv() (*Reading, error) {
|
||||
m := new(Reading)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// HWServiceServer is the server API for HWService service.
|
||||
// All implementations must embed UnimplementedHWServiceServer
|
||||
// for forward compatibility
|
||||
type HWServiceServer interface {
|
||||
PollTime(context.Context, *emptypb.Empty) (*PollTimeReply, error)
|
||||
Sensors(*emptypb.Empty, HWService_SensorsServer) error
|
||||
ReadingsForSensorID(*SensorIDRequest, HWService_ReadingsForSensorIDServer) error
|
||||
mustEmbedUnimplementedHWServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedHWServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedHWServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedHWServiceServer) PollTime(context.Context, *emptypb.Empty) (*PollTimeReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PollTime not implemented")
|
||||
}
|
||||
func (UnimplementedHWServiceServer) Sensors(*emptypb.Empty, HWService_SensorsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Sensors not implemented")
|
||||
}
|
||||
func (UnimplementedHWServiceServer) ReadingsForSensorID(*SensorIDRequest, HWService_ReadingsForSensorIDServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method ReadingsForSensorID not implemented")
|
||||
}
|
||||
func (UnimplementedHWServiceServer) mustEmbedUnimplementedHWServiceServer() {}
|
||||
|
||||
// UnsafeHWServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to HWServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeHWServiceServer interface {
|
||||
mustEmbedUnimplementedHWServiceServer()
|
||||
}
|
||||
|
||||
func RegisterHWServiceServer(s grpc.ServiceRegistrar, srv HWServiceServer) {
|
||||
s.RegisterService(&HWService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _HWService_PollTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HWServiceServer).PollTime(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/proto.HWService/PollTime",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HWServiceServer).PollTime(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HWService_Sensors_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(emptypb.Empty)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(HWServiceServer).Sensors(m, &hWServiceSensorsServer{stream})
|
||||
}
|
||||
|
||||
type HWService_SensorsServer interface {
|
||||
Send(*Sensor) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type hWServiceSensorsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *hWServiceSensorsServer) Send(m *Sensor) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _HWService_ReadingsForSensorID_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SensorIDRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(HWServiceServer).ReadingsForSensorID(m, &hWServiceReadingsForSensorIDServer{stream})
|
||||
}
|
||||
|
||||
type HWService_ReadingsForSensorIDServer interface {
|
||||
Send(*Reading) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type hWServiceReadingsForSensorIDServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *hWServiceReadingsForSensorIDServer) Send(m *Reading) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
// HWService_ServiceDesc is the grpc.ServiceDesc for HWService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var HWService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "proto.HWService",
|
||||
HandlerType: (*HWServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "PollTime",
|
||||
Handler: _HWService_PollTime_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Sensors",
|
||||
Handler: _HWService_Sensors_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "ReadingsForSensorID",
|
||||
Handler: _HWService_ReadingsForSensorID_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "pkg/service/proto/hwservice.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user