AsyncCommunication

package
v0.0.0-...-7972e46 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Agent_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.Agent",
	HandlerType: (*AgentServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Communicate",
			Handler:       _Agent_Communicate_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "stream.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_stream_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServer

func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)

Types

type AgentClient

type AgentClient interface {
	Communicate(ctx context.Context, opts ...grpc.CallOption) (Agent_CommunicateClient, 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 {
	Communicate(Agent_CommunicateServer) error
	// contains filtered or unexported methods
}

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

type Agent_CommunicateClient

type Agent_CommunicateClient interface {
	Send(*Request) error
	Recv() (*Response, error)
	grpc.ClientStream
}

type Agent_CommunicateServer

type Agent_CommunicateServer interface {
	Send(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

type Request

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

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetMessage

func (x *Request) GetMessage() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetResult

func (x *Response) GetResult() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedAgentServer

type UnimplementedAgentServer struct {
}

UnimplementedAgentServer must be embedded to have forward compatible implementations.

func (UnimplementedAgentServer) Communicate

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