grpc

package
v0.0.0-...-66e1447 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewServer

func NewServer(log symo.Logger, config symo.Config) symo.GRPCServer

NewServer возвращает gRPC сервер.

func RegisterSymoServer

func RegisterSymoServer(s grpc.ServiceRegistrar, srv SymoServer)

Types

type CPU

type CPU struct {
	User   float64 `protobuf:"fixed64,1,opt,name=User,proto3" json:"User,omitempty"`
	System float64 `protobuf:"fixed64,2,opt,name=System,proto3" json:"System,omitempty"`
	Idle   float64 `protobuf:"fixed64,3,opt,name=Idle,proto3" json:"Idle,omitempty"`
	// contains filtered or unexported fields
}

func (*CPU) Descriptor deprecated

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

Deprecated: Use CPU.ProtoReflect.Descriptor instead.

func (*CPU) GetIdle

func (x *CPU) GetIdle() float64

func (*CPU) GetSystem

func (x *CPU) GetSystem() float64

func (*CPU) GetUser

func (x *CPU) GetUser() float64

func (*CPU) ProtoMessage

func (*CPU) ProtoMessage()

func (*CPU) ProtoReflect

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

func (*CPU) Reset

func (x *CPU) Reset()

func (*CPU) String

func (x *CPU) String() string

type LoadAvg

type LoadAvg struct {
	Load1  float64 `protobuf:"fixed64,1,opt,name=Load1,proto3" json:"Load1,omitempty"`
	Load5  float64 `protobuf:"fixed64,2,opt,name=Load5,proto3" json:"Load5,omitempty"`
	Load15 float64 `protobuf:"fixed64,3,opt,name=Load15,proto3" json:"Load15,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadAvg) Descriptor deprecated

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

Deprecated: Use LoadAvg.ProtoReflect.Descriptor instead.

func (*LoadAvg) GetLoad1

func (x *LoadAvg) GetLoad1() float64

func (*LoadAvg) GetLoad15

func (x *LoadAvg) GetLoad15() float64

func (*LoadAvg) GetLoad5

func (x *LoadAvg) GetLoad5() float64

func (*LoadAvg) ProtoMessage

func (*LoadAvg) ProtoMessage()

func (*LoadAvg) ProtoReflect

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

func (*LoadAvg) Reset

func (x *LoadAvg) Reset()

func (*LoadAvg) String

func (x *LoadAvg) String() string

type LoadDisk

type LoadDisk struct {
	Name    string  `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Tps     float64 `protobuf:"fixed64,2,opt,name=Tps,proto3" json:"Tps,omitempty"`
	KBRead  float64 `protobuf:"fixed64,3,opt,name=KBRead,proto3" json:"KBRead,omitempty"`
	KBWrite float64 `protobuf:"fixed64,4,opt,name=KBWrite,proto3" json:"KBWrite,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadDisk) Descriptor deprecated

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

Deprecated: Use LoadDisk.ProtoReflect.Descriptor instead.

func (*LoadDisk) GetKBRead

func (x *LoadDisk) GetKBRead() float64

func (*LoadDisk) GetKBWrite

func (x *LoadDisk) GetKBWrite() float64

func (*LoadDisk) GetName

func (x *LoadDisk) GetName() string

func (*LoadDisk) GetTps

func (x *LoadDisk) GetTps() float64

func (*LoadDisk) ProtoMessage

func (*LoadDisk) ProtoMessage()

func (*LoadDisk) ProtoReflect

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

func (*LoadDisk) Reset

func (x *LoadDisk) Reset()

func (*LoadDisk) String

func (x *LoadDisk) String() string

type Stats

type Stats struct {
	Time      *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	LoadAvg   *LoadAvg               `protobuf:"bytes,2,opt,name=load_avg,json=loadAvg,proto3" json:"load_avg,omitempty"`
	Cpu       *CPU                   `protobuf:"bytes,3,opt,name=cpu,proto3" json:"cpu,omitempty"`
	LoadDisks []*LoadDisk            `protobuf:"bytes,4,rep,name=load_disks,json=loadDisks,proto3" json:"load_disks,omitempty"`
	UsedFs    []*UsedFS              `protobuf:"bytes,5,rep,name=used_fs,json=usedFs,proto3" json:"used_fs,omitempty"`
	// contains filtered or unexported fields
}

func (*Stats) Descriptor deprecated

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

Deprecated: Use Stats.ProtoReflect.Descriptor instead.

func (*Stats) GetCpu

func (x *Stats) GetCpu() *CPU

func (*Stats) GetLoadAvg

func (x *Stats) GetLoadAvg() *LoadAvg

func (*Stats) GetLoadDisks

func (x *Stats) GetLoadDisks() []*LoadDisk

func (*Stats) GetTime

func (x *Stats) GetTime() *timestamppb.Timestamp

func (*Stats) GetUsedFs

func (x *Stats) GetUsedFs() []*UsedFS

func (*Stats) ProtoMessage

func (*Stats) ProtoMessage()

func (*Stats) ProtoReflect

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

func (*Stats) Reset

func (x *Stats) Reset()

func (*Stats) String

func (x *Stats) String() string

type StatsRequest

type StatsRequest struct {
	N int32 `protobuf:"varint,1,opt,name=N,proto3" json:"N,omitempty"`
	M int32 `protobuf:"varint,2,opt,name=M,proto3" json:"M,omitempty"`
	// contains filtered or unexported fields
}

func (*StatsRequest) Descriptor deprecated

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

Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.

func (*StatsRequest) GetM

func (x *StatsRequest) GetM() int32

func (*StatsRequest) GetN

func (x *StatsRequest) GetN() int32

func (*StatsRequest) ProtoMessage

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) ProtoReflect

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

func (*StatsRequest) Reset

func (x *StatsRequest) Reset()

func (*StatsRequest) String

func (x *StatsRequest) String() string

type SymoClient

type SymoClient interface {
	GetStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (Symo_GetStatsClient, error)
}

SymoClient is the client API for Symo 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 NewSymoClient

func NewSymoClient(cc grpc.ClientConnInterface) SymoClient

type SymoServer

type SymoServer interface {
	GetStats(*StatsRequest, Symo_GetStatsServer) error
	// contains filtered or unexported methods
}

SymoServer is the server API for Symo service. All implementations must embed UnimplementedSymoServer for forward compatibility

type Symo_GetStatsClient

type Symo_GetStatsClient interface {
	Recv() (*Stats, error)
	grpc.ClientStream
}

type Symo_GetStatsServer

type Symo_GetStatsServer interface {
	Send(*Stats) error
	grpc.ServerStream
}

type UnimplementedSymoServer

type UnimplementedSymoServer struct {
}

UnimplementedSymoServer must be embedded to have forward compatible implementations.

func (UnimplementedSymoServer) GetStats

type UnsafeSymoServer

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

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

type UsedFS

type UsedFS struct {
	Path      string  `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"`
	UsedSpace float64 `protobuf:"fixed64,2,opt,name=UsedSpace,proto3" json:"UsedSpace,omitempty"`
	UsedInode float64 `protobuf:"fixed64,3,opt,name=UsedInode,proto3" json:"UsedInode,omitempty"`
	// contains filtered or unexported fields
}

func (*UsedFS) Descriptor deprecated

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

Deprecated: Use UsedFS.ProtoReflect.Descriptor instead.

func (*UsedFS) GetPath

func (x *UsedFS) GetPath() string

func (*UsedFS) GetUsedInode

func (x *UsedFS) GetUsedInode() float64

func (*UsedFS) GetUsedSpace

func (x *UsedFS) GetUsedSpace() float64

func (*UsedFS) ProtoMessage

func (*UsedFS) ProtoMessage()

func (*UsedFS) ProtoReflect

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

func (*UsedFS) Reset

func (x *UsedFS) Reset()

func (*UsedFS) String

func (x *UsedFS) String() string

Jump to

Keyboard shortcuts

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