go_micro_transport_grpc

package
v1.2.107 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransportEndpoints

func NewTransportEndpoints() []*api.Endpoint

func RegisterTransportHandler

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

func RegisterTransportServer

func RegisterTransportServer(s *grpc.Server, 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"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Message) Descriptor

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

func (*Message) GetBody

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

func (*Message) GetHeader

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

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type TransportClient

type TransportClient interface {
	Stream(ctx context.Context, opts ...grpc.CallOption) (Transport_StreamClient, error)
}

TransportClient is the client API for Transport service.

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

func NewTransportClient

func NewTransportClient(cc *grpc.ClientConn) TransportClient

type TransportHandler

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

type TransportServer

type TransportServer interface {
	Stream(Transport_StreamServer) error
}

TransportServer is the server API for Transport service.

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 interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ClientStream
}

type Transport_StreamServer

type Transport_StreamServer interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ServerStream
}

type Transport_StreamService

type Transport_StreamService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) 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 can be embedded to have forward compatible implementations.

func (*UnimplementedTransportServer) Stream

Jump to

Keyboard shortcuts

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