test_proto

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_points_proto protoreflect.FileDescriptor
View Source
var Handler_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "points.Handler",
	HandlerType: (*HandlerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Do",
			Handler:    _Handler_Do_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "points.proto",
}

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

Functions

func RegisterHandlerServer

func RegisterHandlerServer(s grpc.ServiceRegistrar, srv HandlerServer)

Types

type HandlerClient

type HandlerClient interface {
	Do(ctx context.Context, in *Points, opts ...grpc.CallOption) (*PointsResponse, error)
}

HandlerClient is the client API for Handler 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 NewHandlerClient

func NewHandlerClient(cc grpc.ClientConnInterface) HandlerClient

type HandlerServer

type HandlerServer interface {
	Do(context.Context, *Points) (*PointsResponse, error)
	// contains filtered or unexported methods
}

HandlerServer is the server API for Handler service. All implementations must embed UnimplementedHandlerServer for forward compatibility

type Point

type Point struct {
	Measurement string  `protobuf:"bytes,1,opt,name=measurement,proto3" json:"measurement,omitempty"`
	Timestamp   int64   `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Name        string  `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Val         float64 `protobuf:"fixed64,4,opt,name=val,proto3" json:"val,omitempty"`
	// contains filtered or unexported fields
}

func (*Point) Descriptor deprecated

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

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetMeasurement

func (x *Point) GetMeasurement() string

func (*Point) GetName

func (x *Point) GetName() string

func (*Point) GetTimestamp

func (x *Point) GetTimestamp() int64

func (*Point) GetVal

func (x *Point) GetVal() float64

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) ProtoReflect

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

func (*Point) Reset

func (x *Point) Reset()

func (*Point) String

func (x *Point) String() string

type Points

type Points struct {
	Class  string   `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"`
	Source string   `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	Points []*Point `protobuf:"bytes,3,rep,name=points,proto3" json:"points,omitempty"`
	// contains filtered or unexported fields
}

func (*Points) Descriptor deprecated

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

Deprecated: Use Points.ProtoReflect.Descriptor instead.

func (*Points) GetClass

func (x *Points) GetClass() string

func (*Points) GetPoints

func (x *Points) GetPoints() []*Point

func (*Points) GetSource

func (x *Points) GetSource() string

func (*Points) ProtoMessage

func (*Points) ProtoMessage()

func (*Points) ProtoReflect

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

func (*Points) Reset

func (x *Points) Reset()

func (*Points) String

func (x *Points) String() string

type PointsResponse

type PointsResponse struct {
	Processed uint32 `protobuf:"varint,1,opt,name=processed,proto3" json:"processed,omitempty"`
	Status    uint32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Error     string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*PointsResponse) Descriptor deprecated

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

Deprecated: Use PointsResponse.ProtoReflect.Descriptor instead.

func (*PointsResponse) GetError

func (x *PointsResponse) GetError() string

func (*PointsResponse) GetProcessed

func (x *PointsResponse) GetProcessed() uint32

func (*PointsResponse) GetStatus

func (x *PointsResponse) GetStatus() uint32

func (*PointsResponse) ProtoMessage

func (*PointsResponse) ProtoMessage()

func (*PointsResponse) ProtoReflect

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

func (*PointsResponse) Reset

func (x *PointsResponse) Reset()

func (*PointsResponse) String

func (x *PointsResponse) String() string

type UnimplementedHandlerServer

type UnimplementedHandlerServer struct {
}

UnimplementedHandlerServer must be embedded to have forward compatible implementations.

func (UnimplementedHandlerServer) Do

type UnsafeHandlerServer

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

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

Jump to

Keyboard shortcuts

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