Documentation ¶
Index ¶
- Variables
- func RegisterAgentServer(s *grpc.Server, srv AgentServer)
- func RunServer(serviceName string, addr string, server AgentServer)
- type AgentClient
- type AgentServer
- type Deploy
- type HealthImpl
- type Invoke
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)deprecated
- func (x *Packet) GetDeploy() *Deploy
- func (x *Packet) GetInvoke() *Invoke
- func (m *Packet) GetPayload() isPacket_Payload
- func (x *Packet) GetSendAddress() string
- func (x *Packet) GetSourceAddress() string
- func (x *Packet) GetTransport() *Transport
- func (x *Packet) GetType() PacketType
- func (*Packet) ProtoMessage()
- func (x *Packet) ProtoReflect() protoreflect.Message
- func (x *Packet) Reset()
- func (x *Packet) String() string
- type PacketType
- type Packet_Deploy
- type Packet_Invoke
- type Packet_Transport
- type Transport
- type UnimplementedAgentServer
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 ¶
AgentServer is the server API for Agent service.
type Deploy ¶
type Deploy struct {
// contains filtered or unexported fields
}
func (*Deploy) Descriptor
deprecated
func (*Deploy) ProtoMessage ¶
func (*Deploy) ProtoMessage()
func (*Deploy) ProtoReflect ¶
func (x *Deploy) ProtoReflect() protoreflect.Message
type HealthImpl ¶
type HealthImpl struct{}
HealthImpl dedicate to grpc service check, it realized the HealthServer interface
func (*HealthImpl) Check ¶
func (h *HealthImpl) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
func (*HealthImpl) Watch ¶
func (h *HealthImpl) Watch(req *grpc_health_v1.HealthCheckRequest, w grpc_health_v1.Health_WatchServer) error
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) GetFuncName ¶
func (*Invoke) ProtoMessage ¶
func (*Invoke) ProtoMessage()
func (*Invoke) ProtoReflect ¶
func (x *Invoke) ProtoReflect() protoreflect.Message
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) GetPayload ¶
func (m *Packet) GetPayload() isPacket_Payload
func (*Packet) GetSendAddress ¶
func (*Packet) GetSourceAddress ¶
func (*Packet) GetTransport ¶
func (*Packet) GetType ¶
func (x *Packet) GetType() PacketType
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
func (*Packet) ProtoReflect ¶
func (x *Packet) ProtoReflect() protoreflect.Message
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 ¶
func (PacketType) Type() protoreflect.EnumType
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) ProtoMessage ¶
func (*Transport) ProtoMessage()
func (*Transport) ProtoReflect ¶
func (x *Transport) ProtoReflect() protoreflect.Message
type UnimplementedAgentServer ¶
type UnimplementedAgentServer struct { }
UnimplementedAgentServer can be embedded to have forward compatible implementations.
Click to show internal directories.
Click to hide internal directories.