grpc

package
v0.0.0-...-af869ec Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_Service_proto protoreflect.FileDescriptor
View Source
var Statistics_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "service.Statistics",
	HandlerType: (*StatisticsServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListStatistics",
			Handler:       _Statistics_ListStatistics_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "Service.proto",
}

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

Functions

func RegisterStatisticsServer

func RegisterStatisticsServer(s grpc.ServiceRegistrar, srv StatisticsServer)

Types

type CPUAverage

type CPUAverage struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	User   string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Sys    string `protobuf:"bytes,3,opt,name=sys,proto3" json:"sys,omitempty"`
	Idle   string `protobuf:"bytes,4,opt,name=idle,proto3" json:"idle,omitempty"`
	// contains filtered or unexported fields
}

func (*CPUAverage) Descriptor deprecated

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

Deprecated: Use CPUAverage.ProtoReflect.Descriptor instead.

func (*CPUAverage) GetIdle

func (x *CPUAverage) GetIdle() string

func (*CPUAverage) GetStatus

func (x *CPUAverage) GetStatus() string

func (*CPUAverage) GetSys

func (x *CPUAverage) GetSys() string

func (*CPUAverage) GetUser

func (x *CPUAverage) GetUser() string

func (*CPUAverage) ProtoMessage

func (*CPUAverage) ProtoMessage()

func (*CPUAverage) ProtoReflect

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

func (*CPUAverage) Reset

func (x *CPUAverage) Reset()

func (*CPUAverage) String

func (x *CPUAverage) String() string

type LoadAverage

type LoadAverage struct {
	Status     string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	OneMin     string `protobuf:"bytes,2,opt,name=oneMin,proto3" json:"oneMin,omitempty"`
	FiveMin    string `protobuf:"bytes,3,opt,name=fiveMin,proto3" json:"fiveMin,omitempty"`
	FifteenMin string `protobuf:"bytes,4,opt,name=fifteenMin,proto3" json:"fifteenMin,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadAverage) Descriptor deprecated

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

Deprecated: Use LoadAverage.ProtoReflect.Descriptor instead.

func (*LoadAverage) GetFifteenMin

func (x *LoadAverage) GetFifteenMin() string

func (*LoadAverage) GetFiveMin

func (x *LoadAverage) GetFiveMin() string

func (*LoadAverage) GetOneMin

func (x *LoadAverage) GetOneMin() string

func (*LoadAverage) GetStatus

func (x *LoadAverage) GetStatus() string

func (*LoadAverage) ProtoMessage

func (*LoadAverage) ProtoMessage()

func (*LoadAverage) ProtoReflect

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

func (*LoadAverage) Reset

func (x *LoadAverage) Reset()

func (*LoadAverage) String

func (x *LoadAverage) String() string

type StatisticsClient

type StatisticsClient interface {
	ListStatistics(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Statistics_ListStatisticsClient, error)
}

StatisticsClient is the client API for Statistics 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 NewStatisticsClient

func NewStatisticsClient(cc grpc.ClientConnInterface) StatisticsClient

type StatisticsResponse

type StatisticsResponse struct {
	Status string       `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	La     *LoadAverage `protobuf:"bytes,2,opt,name=la,proto3" json:"la,omitempty"`
	Cp     *CPUAverage  `protobuf:"bytes,3,opt,name=cp,proto3" json:"cp,omitempty"`
	// contains filtered or unexported fields
}

func (*StatisticsResponse) Descriptor deprecated

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

Deprecated: Use StatisticsResponse.ProtoReflect.Descriptor instead.

func (*StatisticsResponse) GetCp

func (x *StatisticsResponse) GetCp() *CPUAverage

func (*StatisticsResponse) GetLa

func (x *StatisticsResponse) GetLa() *LoadAverage

func (*StatisticsResponse) GetStatus

func (x *StatisticsResponse) GetStatus() string

func (*StatisticsResponse) ProtoMessage

func (*StatisticsResponse) ProtoMessage()

func (*StatisticsResponse) ProtoReflect

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

func (*StatisticsResponse) Reset

func (x *StatisticsResponse) Reset()

func (*StatisticsResponse) String

func (x *StatisticsResponse) String() string

type StatisticsServer

type StatisticsServer interface {
	ListStatistics(*SubscriptionRequest, Statistics_ListStatisticsServer) error
	// contains filtered or unexported methods
}

StatisticsServer is the server API for Statistics service. All implementations must embed UnimplementedStatisticsServer for forward compatibility

type Statistics_ListStatisticsClient

type Statistics_ListStatisticsClient interface {
	Recv() (*StatisticsResponse, error)
	grpc.ClientStream
}

type Statistics_ListStatisticsServer

type Statistics_ListStatisticsServer interface {
	Send(*StatisticsResponse) error
	grpc.ServerStream
}

type SubscriptionRequest

type SubscriptionRequest struct {
	Period *durationpb.Duration `protobuf:"bytes,1,opt,name=period,proto3" json:"period,omitempty"`
	Depth  int64                `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionRequest) Descriptor deprecated

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

Deprecated: Use SubscriptionRequest.ProtoReflect.Descriptor instead.

func (*SubscriptionRequest) GetDepth

func (x *SubscriptionRequest) GetDepth() int64

func (*SubscriptionRequest) GetPeriod

func (x *SubscriptionRequest) GetPeriod() *durationpb.Duration

func (*SubscriptionRequest) ProtoMessage

func (*SubscriptionRequest) ProtoMessage()

func (*SubscriptionRequest) ProtoReflect

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

func (*SubscriptionRequest) Reset

func (x *SubscriptionRequest) Reset()

func (*SubscriptionRequest) String

func (x *SubscriptionRequest) String() string

type UnimplementedStatisticsServer

type UnimplementedStatisticsServer struct {
}

UnimplementedStatisticsServer must be embedded to have forward compatible implementations.

func (UnimplementedStatisticsServer) ListStatistics

type UnsafeStatisticsServer

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

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

Jump to

Keyboard shortcuts

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