proto

package
v0.0.0-...-fa6fafb Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Transport_Stream_FullMethodName = "/go.micro.transport.grpc.Transport/Stream"
)

Variables

View Source
var File_proto_transport_proto protoreflect.FileDescriptor
View Source
var Transport_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "go.micro.transport.grpc.Transport",
	HandlerType: (*TransportServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _Transport_Stream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/transport.proto",
}

Transport_ServiceDesc is the grpc.ServiceDesc for Transport service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTransportHandler

func RegisterTransportHandler(s server.Server, hdlr TransportHandler, opts ...server.HandlerOption) error

func RegisterTransportServer

func RegisterTransportServer(s grpc.ServiceRegistrar, srv TransportServer)

Types

type Message

type Message struct {
	Header map[string]string `` /* 153-byte string literal not displayed */
	Body   []byte            `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetBody

func (x *Message) GetBody() []byte

func (*Message) GetHeader

func (x *Message) GetHeader() map[string]string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type TransportClient

type TransportClient interface {
	Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Message, Message], error)
}

TransportClient is the client API for Transport 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 NewTransportClient

func NewTransportClient(cc grpc.ClientConnInterface) TransportClient

type TransportHandler

type TransportHandler interface {
	Stream(context.Context, Transport_StreamStream) error
}

type TransportServer

type TransportServer interface {
	Stream(grpc.BidiStreamingServer[Message, Message]) error
	// contains filtered or unexported methods
}

TransportServer is the server API for Transport service. All implementations must embed UnimplementedTransportServer for forward compatibility.

type TransportService

type TransportService interface {
	Stream(ctx context.Context, opts ...client.CallOption) (Transport_StreamService, error)
}

func NewTransportService

func NewTransportService(name string, c client.Client) TransportService

type Transport_StreamClient

type Transport_StreamClient = grpc.BidiStreamingClient[Message, Message]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Transport_StreamServer

type Transport_StreamServer = grpc.BidiStreamingServer[Message, Message]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Transport_StreamService

type Transport_StreamService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	CloseSend() error
	Close() error
	Send(*Message) error
	Recv() (*Message, error)
}

type Transport_StreamStream

type Transport_StreamStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*Message) error
	Recv() (*Message, error)
}

type UnimplementedTransportServer

type UnimplementedTransportServer struct{}

UnimplementedTransportServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTransportServer) Stream

type UnsafeTransportServer

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

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

Jump to

Keyboard shortcuts

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