grpc

package
v0.0.0-...-ab9c376 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CpuTemp_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cputemp.CpuTemp",
	HandlerType: (*CpuTempServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCpuTemperature",
			Handler:    _CpuTemp_GetCpuTemperature_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc_Cpu/protobuf/cpu_temp.proto",
}

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

View Source
var File_grpc_Cpu_protobuf_cpu_temp_proto protoreflect.FileDescriptor

Functions

func RegisterCpuTempServer

func RegisterCpuTempServer(s grpc.ServiceRegistrar, srv CpuTempServer)

Types

type CpuTempClient

type CpuTempClient interface {
	// A simple RPC.
	//
	// Obtains the current location
	//
	// A feature with an empty name is returned if there's no feature at the given
	// position.
	GetCpuTemperature(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Units, error)
}

CpuTempClient is the client API for CpuTemp 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 NewCpuTempClient

func NewCpuTempClient(cc grpc.ClientConnInterface) CpuTempClient

type CpuTempServer

type CpuTempServer interface {
	// A simple RPC.
	//
	// Obtains the current location
	//
	// A feature with an empty name is returned if there's no feature at the given
	// position.
	GetCpuTemperature(context.Context, *Empty) (*Units, error)
	// contains filtered or unexported methods
}

CpuTempServer is the server API for CpuTemp service. All implementations must embed UnimplementedCpuTempServer for forward compatibility

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:

service Foo {
  rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}

The JSON representation for `Empty` is empty JSON object `{}`.

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Temperature

type Temperature struct {
	Unit      string  `protobuf:"bytes,1,opt,name=Unit,proto3" json:"Unit,omitempty"`
	Current   float64 `protobuf:"fixed64,2,opt,name=Current,proto3" json:"Current,omitempty"`
	High      float64 `protobuf:"fixed64,3,opt,name=High,proto3" json:"High,omitempty"`
	Critical  float64 `protobuf:"fixed64,4,opt,name=Critical,proto3" json:"Critical,omitempty"`
	TimeStamp int64   `protobuf:"varint,5,opt,name=TimeStamp,proto3" json:"TimeStamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Temperature) Descriptor deprecated

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

Deprecated: Use Temperature.ProtoReflect.Descriptor instead.

func (*Temperature) GetCritical

func (x *Temperature) GetCritical() float64

func (*Temperature) GetCurrent

func (x *Temperature) GetCurrent() float64

func (*Temperature) GetHigh

func (x *Temperature) GetHigh() float64

func (*Temperature) GetTimeStamp

func (x *Temperature) GetTimeStamp() int64

func (*Temperature) GetUnit

func (x *Temperature) GetUnit() string

func (*Temperature) ProtoMessage

func (*Temperature) ProtoMessage()

func (*Temperature) ProtoReflect

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

func (*Temperature) Reset

func (x *Temperature) Reset()

func (*Temperature) String

func (x *Temperature) String() string

type UnimplementedCpuTempServer

type UnimplementedCpuTempServer struct {
}

UnimplementedCpuTempServer must be embedded to have forward compatible implementations.

func (UnimplementedCpuTempServer) GetCpuTemperature

func (UnimplementedCpuTempServer) GetCpuTemperature(context.Context, *Empty) (*Units, error)

type Units

type Units struct {
	Temp []*Temperature `protobuf:"bytes,1,rep,name=Temp,proto3" json:"Temp,omitempty"`
	// contains filtered or unexported fields
}

func (*Units) Descriptor deprecated

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

Deprecated: Use Units.ProtoReflect.Descriptor instead.

func (*Units) GetTemp

func (x *Units) GetTemp() []*Temperature

func (*Units) ProtoMessage

func (*Units) ProtoMessage()

func (*Units) ProtoReflect

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

func (*Units) Reset

func (x *Units) Reset()

func (*Units) String

func (x *Units) String() string

type UnsafeCpuTempServer

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

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

Jump to

Keyboard shortcuts

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