protocol

package
v0.0.0-...-c229084 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_rpc_protocol_heartbeat_proto protoreflect.FileDescriptor
View Source
var File_rpc_protocol_message_proto protoreflect.FileDescriptor

Functions

func RegisterHeartbeatServer

func RegisterHeartbeatServer(s *grpc.Server, srv HeartbeatServer)

func RegisterMessageServer

func RegisterMessageServer(s *grpc.Server, srv MessageServer)

Types

type AgentInfo

type AgentInfo struct {
	Listen        string                  `protobuf:"bytes,1,opt,name=listen,proto3" json:"listen,omitempty"`
	LogPath       string                  `protobuf:"bytes,2,opt,name=logPath,proto3" json:"logPath,omitempty"`
	Host          *AgentInfoHost          `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
	Load          *AgentInfoLoad          `protobuf:"bytes,4,opt,name=load,proto3" json:"load,omitempty"`
	MemorySwap    *AgentInfoMemorySwap    `protobuf:"bytes,5,opt,name=memorySwap,proto3" json:"memorySwap,omitempty"`
	MemoryVirtual *AgentInfoMemoryVirtual `protobuf:"bytes,6,opt,name=memoryVirtual,proto3" json:"memoryVirtual,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentInfo) Descriptor deprecated

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

Deprecated: Use AgentInfo.ProtoReflect.Descriptor instead.

func (*AgentInfo) GetHost

func (x *AgentInfo) GetHost() *AgentInfoHost

func (*AgentInfo) GetListen

func (x *AgentInfo) GetListen() string

func (*AgentInfo) GetLoad

func (x *AgentInfo) GetLoad() *AgentInfoLoad

func (*AgentInfo) GetLogPath

func (x *AgentInfo) GetLogPath() string

func (*AgentInfo) GetMemorySwap

func (x *AgentInfo) GetMemorySwap() *AgentInfoMemorySwap

func (*AgentInfo) GetMemoryVirtual

func (x *AgentInfo) GetMemoryVirtual() *AgentInfoMemoryVirtual

func (*AgentInfo) ProtoMessage

func (*AgentInfo) ProtoMessage()

func (*AgentInfo) ProtoReflect

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

func (*AgentInfo) Reset

func (x *AgentInfo) Reset()

func (*AgentInfo) String

func (x *AgentInfo) String() string

type AgentInfoHost

type AgentInfoHost struct {
	Hostname        string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Uptime          int64  `protobuf:"varint,2,opt,name=uptime,proto3" json:"uptime,omitempty"`
	BootTime        int64  `protobuf:"varint,3,opt,name=bootTime,proto3" json:"bootTime,omitempty"`
	Procs           int64  `protobuf:"varint,4,opt,name=procs,proto3" json:"procs,omitempty"`
	Os              string `protobuf:"bytes,5,opt,name=os,proto3" json:"os,omitempty"`
	Platform        string `protobuf:"bytes,6,opt,name=platform,proto3" json:"platform,omitempty"`
	PlatformFamily  string `protobuf:"bytes,7,opt,name=platformFamily,proto3" json:"platformFamily,omitempty"`
	PlatformVersion string `protobuf:"bytes,8,opt,name=platformVersion,proto3" json:"platformVersion,omitempty"`
	KernelVersion   string `protobuf:"bytes,9,opt,name=kernelVersion,proto3" json:"kernelVersion,omitempty"`
	KernelArch      string `protobuf:"bytes,10,opt,name=kernelArch,proto3" json:"kernelArch,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentInfoHost) Descriptor deprecated

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

Deprecated: Use AgentInfoHost.ProtoReflect.Descriptor instead.

func (*AgentInfoHost) GetBootTime

func (x *AgentInfoHost) GetBootTime() int64

func (*AgentInfoHost) GetHostname

func (x *AgentInfoHost) GetHostname() string

func (*AgentInfoHost) GetKernelArch

func (x *AgentInfoHost) GetKernelArch() string

func (*AgentInfoHost) GetKernelVersion

func (x *AgentInfoHost) GetKernelVersion() string

func (*AgentInfoHost) GetOs

func (x *AgentInfoHost) GetOs() string

func (*AgentInfoHost) GetPlatform

func (x *AgentInfoHost) GetPlatform() string

func (*AgentInfoHost) GetPlatformFamily

func (x *AgentInfoHost) GetPlatformFamily() string

func (*AgentInfoHost) GetPlatformVersion

func (x *AgentInfoHost) GetPlatformVersion() string

func (*AgentInfoHost) GetProcs

func (x *AgentInfoHost) GetProcs() int64

func (*AgentInfoHost) GetUptime

func (x *AgentInfoHost) GetUptime() int64

func (*AgentInfoHost) ProtoMessage

func (*AgentInfoHost) ProtoMessage()

func (*AgentInfoHost) ProtoReflect

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

func (*AgentInfoHost) Reset

func (x *AgentInfoHost) Reset()

func (*AgentInfoHost) String

func (x *AgentInfoHost) String() string

type AgentInfoLoad

type AgentInfoLoad 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 (*AgentInfoLoad) Descriptor deprecated

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

Deprecated: Use AgentInfoLoad.ProtoReflect.Descriptor instead.

func (*AgentInfoLoad) GetLoad1

func (x *AgentInfoLoad) GetLoad1() float64

func (*AgentInfoLoad) GetLoad15

func (x *AgentInfoLoad) GetLoad15() float64

func (*AgentInfoLoad) GetLoad5

func (x *AgentInfoLoad) GetLoad5() float64

func (*AgentInfoLoad) ProtoMessage

func (*AgentInfoLoad) ProtoMessage()

func (*AgentInfoLoad) ProtoReflect

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

func (*AgentInfoLoad) Reset

func (x *AgentInfoLoad) Reset()

func (*AgentInfoLoad) String

func (x *AgentInfoLoad) String() string

type AgentInfoMemorySwap

type AgentInfoMemorySwap struct {
	Total       int64   `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Used        int64   `protobuf:"varint,2,opt,name=used,proto3" json:"used,omitempty"`
	Free        int64   `protobuf:"varint,3,opt,name=free,proto3" json:"free,omitempty"`
	UsedPercent float64 `protobuf:"fixed64,4,opt,name=usedPercent,proto3" json:"usedPercent,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentInfoMemorySwap) Descriptor deprecated

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

Deprecated: Use AgentInfoMemorySwap.ProtoReflect.Descriptor instead.

func (*AgentInfoMemorySwap) GetFree

func (x *AgentInfoMemorySwap) GetFree() int64

func (*AgentInfoMemorySwap) GetTotal

func (x *AgentInfoMemorySwap) GetTotal() int64

func (*AgentInfoMemorySwap) GetUsed

func (x *AgentInfoMemorySwap) GetUsed() int64

func (*AgentInfoMemorySwap) GetUsedPercent

func (x *AgentInfoMemorySwap) GetUsedPercent() float64

func (*AgentInfoMemorySwap) ProtoMessage

func (*AgentInfoMemorySwap) ProtoMessage()

func (*AgentInfoMemorySwap) ProtoReflect

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

func (*AgentInfoMemorySwap) Reset

func (x *AgentInfoMemorySwap) Reset()

func (*AgentInfoMemorySwap) String

func (x *AgentInfoMemorySwap) String() string

type AgentInfoMemoryVirtual

type AgentInfoMemoryVirtual struct {
	Total       int64   `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Available   int64   `protobuf:"varint,2,opt,name=available,proto3" json:"available,omitempty"`
	Used        int64   `protobuf:"varint,3,opt,name=used,proto3" json:"used,omitempty"`
	UsedPercent float64 `protobuf:"fixed64,4,opt,name=usedPercent,proto3" json:"usedPercent,omitempty"`
	Free        int64   `protobuf:"varint,5,opt,name=free,proto3" json:"free,omitempty"`
	Buffers     int64   `protobuf:"varint,6,opt,name=buffers,proto3" json:"buffers,omitempty"`
	Cached      int64   `protobuf:"varint,7,opt,name=cached,proto3" json:"cached,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentInfoMemoryVirtual) Descriptor deprecated

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

Deprecated: Use AgentInfoMemoryVirtual.ProtoReflect.Descriptor instead.

func (*AgentInfoMemoryVirtual) GetAvailable

func (x *AgentInfoMemoryVirtual) GetAvailable() int64

func (*AgentInfoMemoryVirtual) GetBuffers

func (x *AgentInfoMemoryVirtual) GetBuffers() int64

func (*AgentInfoMemoryVirtual) GetCached

func (x *AgentInfoMemoryVirtual) GetCached() int64

func (*AgentInfoMemoryVirtual) GetFree

func (x *AgentInfoMemoryVirtual) GetFree() int64

func (*AgentInfoMemoryVirtual) GetTotal

func (x *AgentInfoMemoryVirtual) GetTotal() int64

func (*AgentInfoMemoryVirtual) GetUsed

func (x *AgentInfoMemoryVirtual) GetUsed() int64

func (*AgentInfoMemoryVirtual) GetUsedPercent

func (x *AgentInfoMemoryVirtual) GetUsedPercent() float64

func (*AgentInfoMemoryVirtual) ProtoMessage

func (*AgentInfoMemoryVirtual) ProtoMessage()

func (*AgentInfoMemoryVirtual) ProtoReflect

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

func (*AgentInfoMemoryVirtual) Reset

func (x *AgentInfoMemoryVirtual) Reset()

func (*AgentInfoMemoryVirtual) String

func (x *AgentInfoMemoryVirtual) String() string

type HeartbeatClient

type HeartbeatClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error)
}

HeartbeatClient is the client API for Heartbeat service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewHeartbeatClient

func NewHeartbeatClient(cc grpc.ClientConnInterface) HeartbeatClient

type HeartbeatServer

type HeartbeatServer interface {
	Ping(context.Context, *PingRequest) (*PongResponse, error)
}

HeartbeatServer is the server API for Heartbeat service.

type IDResponse

type IDResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*IDResponse) Descriptor deprecated

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

Deprecated: Use IDResponse.ProtoReflect.Descriptor instead.

func (*IDResponse) GetId

func (x *IDResponse) GetId() string

func (*IDResponse) ProtoMessage

func (*IDResponse) ProtoMessage()

func (*IDResponse) ProtoReflect

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

func (*IDResponse) Reset

func (x *IDResponse) Reset()

func (*IDResponse) String

func (x *IDResponse) String() string

type MessageClient

type MessageClient interface {
	Push(ctx context.Context, in *MessageRequest, opts ...grpc.CallOption) (*IDResponse, error)
}

MessageClient is the client API for Event service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMessageClient

func NewMessageClient(cc grpc.ClientConnInterface) MessageClient

type MessageRequest

type MessageRequest struct {
	Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageRequest) Descriptor deprecated

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

Deprecated: Use MessageRequest.ProtoReflect.Descriptor instead.

func (*MessageRequest) GetData

func (x *MessageRequest) GetData() string

func (*MessageRequest) ProtoMessage

func (*MessageRequest) ProtoMessage()

func (*MessageRequest) ProtoReflect

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

func (*MessageRequest) Reset

func (x *MessageRequest) Reset()

func (*MessageRequest) String

func (x *MessageRequest) String() string

type MessageServer

type MessageServer interface {
	Push(context.Context, *MessageRequest) (*IDResponse, error)
}

MessageServer is the server API for Event service.

type PingRequest

type PingRequest struct {
	AgentTs       int64      `protobuf:"varint,1,opt,name=agentTs,proto3" json:"agentTs,omitempty"`
	AgentIP       string     `protobuf:"bytes,2,opt,name=agentIP,proto3" json:"agentIP,omitempty"`
	AgentID       string     `protobuf:"bytes,3,opt,name=agentID,proto3" json:"agentID,omitempty"`
	ClientVersion string     `protobuf:"bytes,4,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"`
	Agent         *AgentInfo `protobuf:"bytes,5,opt,name=agent,proto3" json:"agent,omitempty"`
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetAgent

func (x *PingRequest) GetAgent() *AgentInfo

func (*PingRequest) GetAgentID

func (x *PingRequest) GetAgentID() string

func (*PingRequest) GetAgentIP

func (x *PingRequest) GetAgentIP() string

func (*PingRequest) GetAgentTs

func (x *PingRequest) GetAgentTs() int64

func (*PingRequest) GetClientVersion

func (x *PingRequest) GetClientVersion() string

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PongResponse

type PongResponse struct {
	ServerTs      int64  `protobuf:"varint,1,opt,name=serverTs,proto3" json:"serverTs,omitempty"`
	ServerVersion string `protobuf:"bytes,2,opt,name=serverVersion,proto3" json:"serverVersion,omitempty"`
	// contains filtered or unexported fields
}

func (*PongResponse) Descriptor deprecated

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

Deprecated: Use PongResponse.ProtoReflect.Descriptor instead.

func (*PongResponse) GetServerTs

func (x *PongResponse) GetServerTs() int64

func (*PongResponse) GetServerVersion

func (x *PongResponse) GetServerVersion() string

func (*PongResponse) ProtoMessage

func (*PongResponse) ProtoMessage()

func (*PongResponse) ProtoReflect

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

func (*PongResponse) Reset

func (x *PongResponse) Reset()

func (*PongResponse) String

func (x *PongResponse) String() string

type UnimplementedHeartbeatServer

type UnimplementedHeartbeatServer struct {
}

UnimplementedHeartbeatServer can be embedded to have forward compatible implementations.

func (*UnimplementedHeartbeatServer) Ping

type UnimplementedMessageServer

type UnimplementedMessageServer struct {
}

UnimplementedMessageServer can be embedded to have forward compatible implementations.

func (*UnimplementedMessageServer) Push

Jump to

Keyboard shortcuts

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