telemetry

package
v0.32.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_modules_telemetry_telemetry_proto protoreflect.FileDescriptor
View Source
var Telemetry_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "telemetry.Telemetry",
	HandlerType: (*TelemetryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ReportIOTDevice",
			Handler:    _Telemetry_ReportIOTDevice_Handler,
		},
		{
			MethodName: "ReportNetworkID",
			Handler:    _Telemetry_ReportNetworkID_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "modules/telemetry/telemetry.proto",
}

Telemetry_ServiceDesc is the grpc.ServiceDesc for Telemetry service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTelemetryServer

func RegisterTelemetryServer(s grpc.ServiceRegistrar, srv TelemetryServer)

Types

type Config

type Config struct {
}

type Telemetry

type Telemetry struct {
	UnimplementedTelemetryServer

	services.Service
	// contains filtered or unexported fields
}

func New

func New(cfg Config, logger log.Logger, inv inventory.Inventory, lig *lights.Lights) (*Telemetry, error)

func (*Telemetry) ReportIOTDevice

func (l *Telemetry) ReportIOTDevice(ctx context.Context, request *inventory.IOTDevice) (*inventory.Empty, error)

func (*Telemetry) ReportNetworkID

func (l *Telemetry) ReportNetworkID(ctx context.Context, request *inventory.NetworkID) (*inventory.Empty, error)

func (*Telemetry) SetIOTServer

func (l *Telemetry) SetIOTServer(iotServer *iot.Server) error

type TelemetryClient

type TelemetryClient interface {
	ReportIOTDevice(ctx context.Context, in *inventory.IOTDevice, opts ...grpc.CallOption) (*inventory.Empty, error)
	ReportNetworkID(ctx context.Context, in *inventory.NetworkID, opts ...grpc.CallOption) (*inventory.Empty, error)
}

TelemetryClient is the client API for Telemetry 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 NewTelemetryClient

func NewTelemetryClient(cc grpc.ClientConnInterface) TelemetryClient

type TelemetryServer

type TelemetryServer interface {
	ReportIOTDevice(context.Context, *inventory.IOTDevice) (*inventory.Empty, error)
	ReportNetworkID(context.Context, *inventory.NetworkID) (*inventory.Empty, error)
	// contains filtered or unexported methods
}

TelemetryServer is the server API for Telemetry service. All implementations must embed UnimplementedTelemetryServer for forward compatibility

type UnimplementedTelemetryServer

type UnimplementedTelemetryServer struct {
}

UnimplementedTelemetryServer must be embedded to have forward compatible implementations.

func (UnimplementedTelemetryServer) ReportIOTDevice

func (UnimplementedTelemetryServer) ReportNetworkID

type UnsafeTelemetryServer

type UnsafeTelemetryServer interface {
	// contains filtered or unexported methods
}

UnsafeTelemetryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TelemetryServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL