agent

package
v0.0.0-...-3736fb9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Agent_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "system.agent.Agent",
	HandlerType: (*AgentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Install",
			Handler:    _Agent_Install_Handler,
		},
		{
			MethodName: "Remove",
			Handler:    _Agent_Remove_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "agent.proto",
}

Agent_ServiceDesc is the grpc.ServiceDesc for Agent 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_agent_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServer

func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)

Types

type AgentClient

type AgentClient interface {
	Install(ctx context.Context, in *InstallReq, opts ...grpc.CallOption) (*InstallResp, error)
	Remove(ctx context.Context, in *RemoveReq, opts ...grpc.CallOption) (*RemoveResp, error)
}

AgentClient is the client API for Agent 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 NewAgentClient

func NewAgentClient(cc grpc.ClientConnInterface) AgentClient

type AgentServer

type AgentServer interface {
	Install(context.Context, *InstallReq) (*InstallResp, error)
	Remove(context.Context, *RemoveReq) (*RemoveResp, error)
	// contains filtered or unexported methods
}

AgentServer is the server API for Agent service. All implementations must embed UnimplementedAgentServer for forward compatibility

type CPUPerf

type CPUPerf struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	User   int32  `protobuf:"varint,2,opt,name=user,proto3" json:"user,omitempty"`
	System int32  `protobuf:"varint,3,opt,name=system,proto3" json:"system,omitempty"`
	Idle   int32  `protobuf:"varint,4,opt,name=idle,proto3" json:"idle,omitempty"`
	IoWait int32  `protobuf:"varint,5,opt,name=io_wait,json=ioWait,proto3" json:"io_wait,omitempty"`
	Irq    int32  `protobuf:"varint,6,opt,name=irq,proto3" json:"irq,omitempty"`
	// contains filtered or unexported fields
}

func (*CPUPerf) Descriptor deprecated

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

Deprecated: Use CPUPerf.ProtoReflect.Descriptor instead.

func (*CPUPerf) GetId

func (x *CPUPerf) GetId() string

func (*CPUPerf) GetIdle

func (x *CPUPerf) GetIdle() int32

func (*CPUPerf) GetIoWait

func (x *CPUPerf) GetIoWait() int32

func (*CPUPerf) GetIrq

func (x *CPUPerf) GetIrq() int32

func (*CPUPerf) GetSystem

func (x *CPUPerf) GetSystem() int32

func (*CPUPerf) GetUser

func (x *CPUPerf) GetUser() int32

func (*CPUPerf) ProtoMessage

func (*CPUPerf) ProtoMessage()

func (*CPUPerf) ProtoReflect

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

func (*CPUPerf) Reset

func (x *CPUPerf) Reset()

func (*CPUPerf) String

func (x *CPUPerf) String() string

type CPUPerfs

type CPUPerfs struct {
	ResolutionSecs int32      `protobuf:"varint,1,opt,name=resolutionSecs,proto3" json:"resolutionSecs,omitempty"`
	UnixTimeNano   int64      `protobuf:"varint,2,opt,name=unix_time_nano,json=unixTimeNano,proto3" json:"unix_time_nano,omitempty"`
	Cpu            []*CPUPerf `protobuf:"bytes,3,rep,name=cpu,proto3" json:"cpu,omitempty"`
	// contains filtered or unexported fields
}

func (*CPUPerfs) Descriptor deprecated

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

Deprecated: Use CPUPerfs.ProtoReflect.Descriptor instead.

func (*CPUPerfs) GetCpu

func (x *CPUPerfs) GetCpu() []*CPUPerf

func (*CPUPerfs) GetResolutionSecs

func (x *CPUPerfs) GetResolutionSecs() int32

func (*CPUPerfs) GetUnixTimeNano

func (x *CPUPerfs) GetUnixTimeNano() int64

func (*CPUPerfs) MarshalJSON

func (x *CPUPerfs) MarshalJSON() ([]byte, error)

MarshalJSON implement json.Marshaller for CPUPerfs so that we use the protojson.Marshal() instead of the standard marshaller.

func (*CPUPerfs) ProtoMessage

func (*CPUPerfs) ProtoMessage()

func (*CPUPerfs) ProtoReflect

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

func (*CPUPerfs) Reset

func (x *CPUPerfs) Reset()

func (*CPUPerfs) String

func (x *CPUPerfs) String() string

func (*CPUPerfs) UnmarshalJSON

func (x *CPUPerfs) UnmarshalJSON(b []byte) error

UnmarshalJSON implement json.Unmarshaller for CPUPerfs so that we use the protojson.Unmarshal() instead of the standard unmarshaller.

type InstallReq

type InstallReq struct {
	Name    string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Package []byte   `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
	Binary  string   `protobuf:"bytes,3,opt,name=binary,proto3" json:"binary,omitempty"`
	Args    []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"`
	// contains filtered or unexported fields
}

func (*InstallReq) Descriptor deprecated

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

Deprecated: Use InstallReq.ProtoReflect.Descriptor instead.

func (*InstallReq) GetArgs

func (x *InstallReq) GetArgs() []string

func (*InstallReq) GetBinary

func (x *InstallReq) GetBinary() string

func (*InstallReq) GetName

func (x *InstallReq) GetName() string

func (*InstallReq) GetPackage

func (x *InstallReq) GetPackage() []byte

func (*InstallReq) ProtoMessage

func (*InstallReq) ProtoMessage()

func (*InstallReq) ProtoReflect

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

func (*InstallReq) Reset

func (x *InstallReq) Reset()

func (*InstallReq) String

func (x *InstallReq) String() string

func (*InstallReq) Validate

func (i *InstallReq) Validate() error

Validate is used to validate an InstallReq.

type InstallResp

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

func (*InstallResp) Descriptor deprecated

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

Deprecated: Use InstallResp.ProtoReflect.Descriptor instead.

func (*InstallResp) ProtoMessage

func (*InstallResp) ProtoMessage()

func (*InstallResp) ProtoReflect

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

func (*InstallResp) Reset

func (x *InstallResp) Reset()

func (*InstallResp) String

func (x *InstallResp) String() string

type MemPerf

type MemPerf struct {
	ResolutionSecs int32 `protobuf:"varint,1,opt,name=resolutionSecs,proto3" json:"resolutionSecs,omitempty"`
	UnixTimeNano   int64 `protobuf:"varint,2,opt,name=unix_time_nano,json=unixTimeNano,proto3" json:"unix_time_nano,omitempty"`
	Total          int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
	Free           int32 `protobuf:"varint,4,opt,name=free,proto3" json:"free,omitempty"`
	Avail          int32 `protobuf:"varint,5,opt,name=avail,proto3" json:"avail,omitempty"`
	// contains filtered or unexported fields
}

func (*MemPerf) Descriptor deprecated

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

Deprecated: Use MemPerf.ProtoReflect.Descriptor instead.

func (*MemPerf) GetAvail

func (x *MemPerf) GetAvail() int32

func (*MemPerf) GetFree

func (x *MemPerf) GetFree() int32

func (*MemPerf) GetResolutionSecs

func (x *MemPerf) GetResolutionSecs() int32

func (*MemPerf) GetTotal

func (x *MemPerf) GetTotal() int32

func (*MemPerf) GetUnixTimeNano

func (x *MemPerf) GetUnixTimeNano() int64

func (*MemPerf) MarshalJSON

func (x *MemPerf) MarshalJSON() ([]byte, error)

MarshalJSON implement json.Marshaller for MemPerf so that we use the protojson.Marshal() instead of the standard marshaller.

func (*MemPerf) ProtoMessage

func (*MemPerf) ProtoMessage()

func (*MemPerf) ProtoReflect

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

func (*MemPerf) Reset

func (x *MemPerf) Reset()

func (*MemPerf) String

func (x *MemPerf) String() string

func (*MemPerf) UnmarshalJSON

func (x *MemPerf) UnmarshalJSON(b []byte) error

UnmarshalJSON implement json.Unmarshaller for MemPerf so that we use the protojson.Unmarshal() instead of the standard unmarshaller.

type RemoveReq

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

func (*RemoveReq) Descriptor deprecated

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

Deprecated: Use RemoveReq.ProtoReflect.Descriptor instead.

func (*RemoveReq) GetName

func (x *RemoveReq) GetName() string

func (*RemoveReq) ProtoMessage

func (*RemoveReq) ProtoMessage()

func (*RemoveReq) ProtoReflect

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

func (*RemoveReq) Reset

func (x *RemoveReq) Reset()

func (*RemoveReq) String

func (x *RemoveReq) String() string

type RemoveResp

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

func (*RemoveResp) Descriptor deprecated

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

Deprecated: Use RemoveResp.ProtoReflect.Descriptor instead.

func (*RemoveResp) ProtoMessage

func (*RemoveResp) ProtoMessage()

func (*RemoveResp) ProtoReflect

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

func (*RemoveResp) Reset

func (x *RemoveResp) Reset()

func (*RemoveResp) String

func (x *RemoveResp) String() string

type UnimplementedAgentServer

type UnimplementedAgentServer struct {
}

UnimplementedAgentServer must be embedded to have forward compatible implementations.

func (UnimplementedAgentServer) Install

func (UnimplementedAgentServer) Remove

type UnsafeAgentServer

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

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

Jump to

Keyboard shortcuts

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