tpoller_server

package
v0.0.0-...-923b9eb Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: ISC Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_telemetry_proto protoreflect.FileDescriptor
View Source
var Telemetry_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Telemetry",
	HandlerType: (*TelemetryServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetTimeSeriesData",
			Handler:       _Telemetry_GetTimeSeriesData_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/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)

func ToLabels

func ToLabels(polledLabels []*TelemetryLabel) []*tstorage_pb.Label

Function will convert the data structure from `TelemetryLabel` to `Label` so that `tstorage-server` can accept the values.

func ToTimeSeriesDatum

func ToTimeSeriesDatum(d *TelemetryDatum) *tstorage_pb.TimeSeriesDatum

Function will convert the data structure so that `tstorage-server` can accept the time-series data.

Types

type TelemetryClient

type TelemetryClient interface {
	GetTimeSeriesData(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Telemetry_GetTimeSeriesDataClient, 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 TelemetryDatum

type TelemetryDatum struct {
	Metric    string               `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"`
	Labels    []*TelemetryLabel    `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"`
	Value     float64              `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"`
	Timestamp *timestamp.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*TelemetryDatum) Descriptor deprecated

func (*TelemetryDatum) Descriptor() ([]byte, []int)

Deprecated: Use TelemetryDatum.ProtoReflect.Descriptor instead.

func (*TelemetryDatum) GetLabels

func (x *TelemetryDatum) GetLabels() []*TelemetryLabel

func (*TelemetryDatum) GetMetric

func (x *TelemetryDatum) GetMetric() string

func (*TelemetryDatum) GetTimestamp

func (x *TelemetryDatum) GetTimestamp() *timestamp.Timestamp

func (*TelemetryDatum) GetValue

func (x *TelemetryDatum) GetValue() float64

func (*TelemetryDatum) ProtoMessage

func (*TelemetryDatum) ProtoMessage()

func (*TelemetryDatum) ProtoReflect

func (x *TelemetryDatum) ProtoReflect() protoreflect.Message

func (*TelemetryDatum) Reset

func (x *TelemetryDatum) Reset()

func (*TelemetryDatum) String

func (x *TelemetryDatum) String() string

type TelemetryLabel

type TelemetryLabel struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*TelemetryLabel) Descriptor deprecated

func (*TelemetryLabel) Descriptor() ([]byte, []int)

Deprecated: Use TelemetryLabel.ProtoReflect.Descriptor instead.

func (*TelemetryLabel) GetName

func (x *TelemetryLabel) GetName() string

func (*TelemetryLabel) GetValue

func (x *TelemetryLabel) GetValue() string

func (*TelemetryLabel) ProtoMessage

func (*TelemetryLabel) ProtoMessage()

func (*TelemetryLabel) ProtoReflect

func (x *TelemetryLabel) ProtoReflect() protoreflect.Message

func (*TelemetryLabel) Reset

func (x *TelemetryLabel) Reset()

func (*TelemetryLabel) String

func (x *TelemetryLabel) String() string

type TelemetryServer

type TelemetryServer interface {
	GetTimeSeriesData(*empty.Empty, Telemetry_GetTimeSeriesDataServer) error
	// contains filtered or unexported methods
}

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

type Telemetry_GetTimeSeriesDataClient

type Telemetry_GetTimeSeriesDataClient interface {
	Recv() (*TelemetryDatum, error)
	grpc.ClientStream
}

type Telemetry_GetTimeSeriesDataServer

type Telemetry_GetTimeSeriesDataServer interface {
	Send(*TelemetryDatum) error
	grpc.ServerStream
}

type UnimplementedTelemetryServer

type UnimplementedTelemetryServer struct {
}

UnimplementedTelemetryServer must be embedded to have forward compatible implementations.

func (UnimplementedTelemetryServer) GetTimeSeriesData

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