agent

package
v0.0.0-...-939b1f7 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PacketType_name = map[int32]string{
		0: "DEPLOY",
		1: "TRANSPORT",
		2: "INVOKE",
	}
	PacketType_value = map[string]int32{
		"DEPLOY":    0,
		"TRANSPORT": 1,
		"INVOKE":    2,
	}
)

Enum value maps for PacketType.

View Source
var File_proto_agent_agent_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServer

func RegisterAgentServer(s *grpc.Server, srv AgentServer)

func RunServer

func RunServer(serviceName string, addr string, server AgentServer)

Types

type AgentClient

type AgentClient interface {
	Interact(ctx context.Context, in *Packet, opts ...grpc.CallOption) (*Packet, error)
}

AgentClient is the client API for Agent service.

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

func NewAgentClient

func NewAgentClient(cc grpc.ClientConnInterface) AgentClient

type AgentServer

type AgentServer interface {
	Interact(context.Context, *Packet) (*Packet, error)
}

AgentServer is the server API for Agent service.

type Deploy

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

func (*Deploy) Descriptor deprecated

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

Deprecated: Use Deploy.ProtoReflect.Descriptor instead.

func (*Deploy) ProtoMessage

func (*Deploy) ProtoMessage()

func (*Deploy) ProtoReflect

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

func (*Deploy) Reset

func (x *Deploy) Reset()

func (*Deploy) String

func (x *Deploy) String() string

type HealthImpl

type HealthImpl struct{}

HealthImpl dedicate to grpc service check, it realized the HealthServer interface

type Invoke

type Invoke struct {
	FuncName string `protobuf:"bytes,1,opt,name=funcName,proto3" json:"funcName,omitempty"`
	Args     []byte `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
	// contains filtered or unexported fields
}

func (*Invoke) Descriptor deprecated

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

Deprecated: Use Invoke.ProtoReflect.Descriptor instead.

func (*Invoke) GetArgs

func (x *Invoke) GetArgs() []byte

func (*Invoke) GetFuncName

func (x *Invoke) GetFuncName() string

func (*Invoke) ProtoMessage

func (*Invoke) ProtoMessage()

func (*Invoke) ProtoReflect

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

func (*Invoke) Reset

func (x *Invoke) Reset()

func (*Invoke) String

func (x *Invoke) String() string

type Packet

type Packet struct {
	Type          PacketType `protobuf:"varint,1,opt,name=type,proto3,enum=PacketType" json:"type,omitempty"`
	SourceAddress string     `protobuf:"bytes,2,opt,name=sourceAddress,proto3" json:"sourceAddress,omitempty"`
	SendAddress   string     `protobuf:"bytes,3,opt,name=sendAddress,proto3" json:"sendAddress,omitempty"`
	// Types that are assignable to Payload:
	//	*Packet_Invoke
	//	*Packet_Transport
	//	*Packet_Deploy
	Payload isPacket_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*Packet) Descriptor deprecated

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

Deprecated: Use Packet.ProtoReflect.Descriptor instead.

func (*Packet) GetDeploy

func (x *Packet) GetDeploy() *Deploy

func (*Packet) GetInvoke

func (x *Packet) GetInvoke() *Invoke

func (*Packet) GetPayload

func (m *Packet) GetPayload() isPacket_Payload

func (*Packet) GetSendAddress

func (x *Packet) GetSendAddress() string

func (*Packet) GetSourceAddress

func (x *Packet) GetSourceAddress() string

func (*Packet) GetTransport

func (x *Packet) GetTransport() *Transport

func (*Packet) GetType

func (x *Packet) GetType() PacketType

func (*Packet) ProtoMessage

func (*Packet) ProtoMessage()

func (*Packet) ProtoReflect

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

func (*Packet) Reset

func (x *Packet) Reset()

func (*Packet) String

func (x *Packet) String() string

type PacketType

type PacketType int32
const (
	PacketType_DEPLOY    PacketType = 0
	PacketType_TRANSPORT PacketType = 1
	PacketType_INVOKE    PacketType = 2
)

func (PacketType) Descriptor

func (PacketType) Descriptor() protoreflect.EnumDescriptor

func (PacketType) Enum

func (x PacketType) Enum() *PacketType

func (PacketType) EnumDescriptor deprecated

func (PacketType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PacketType.Descriptor instead.

func (PacketType) Number

func (x PacketType) Number() protoreflect.EnumNumber

func (PacketType) String

func (x PacketType) String() string

func (PacketType) Type

type Packet_Deploy

type Packet_Deploy struct {
	Deploy *Deploy `protobuf:"bytes,6,opt,name=deploy,proto3,oneof"`
}

type Packet_Invoke

type Packet_Invoke struct {
	Invoke *Invoke `protobuf:"bytes,4,opt,name=invoke,proto3,oneof"`
}

type Packet_Transport

type Packet_Transport struct {
	Transport *Transport `protobuf:"bytes,5,opt,name=transport,proto3,oneof"`
}

type Transport

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

func (*Transport) Descriptor deprecated

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

Deprecated: Use Transport.ProtoReflect.Descriptor instead.

func (*Transport) GetData

func (x *Transport) GetData() []byte

func (*Transport) ProtoMessage

func (*Transport) ProtoMessage()

func (*Transport) ProtoReflect

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

func (*Transport) Reset

func (x *Transport) Reset()

func (*Transport) String

func (x *Transport) String() string

type UnimplementedAgentServer

type UnimplementedAgentServer struct {
}

UnimplementedAgentServer can be embedded to have forward compatible implementations.

func (*UnimplementedAgentServer) Interact

Jump to

Keyboard shortcuts

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