grpc

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Stream_Conn_FullMethodName = "/stream.stream/conn"
)

Variables

View Source
var Stream_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "stream.stream",
	HandlerType: (*StreamServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "conn",
			Handler:       _Stream_Conn_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "chunk.proto",
}

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

Functions

func NewClient added in v0.3.3

func NewClient(config *protocol.Protocol_Grpc) point.WrapProxy

func RegisterStreamServer

func RegisterStreamServer(s grpc.ServiceRegistrar, srv StreamServer)

Types

type Grpc

type Grpc struct {
	UnimplementedStreamServer

	Server *grpc.Server
	// contains filtered or unexported fields
}

func NewGrpcNoServer

func NewGrpcNoServer(lis net.Listener) *Grpc

func (*Grpc) Accept

func (g *Grpc) Accept() (net.Conn, error)

func (*Grpc) Addr

func (g *Grpc) Addr() net.Addr

func (*Grpc) Close

func (g *Grpc) Close() error

func (*Grpc) Conn

func (s *Grpc) Conn(con Stream_ConnServer) error

type StreamClient

type StreamClient interface {
	Conn(ctx context.Context, opts ...grpc.CallOption) (Stream_ConnClient, error)
}

StreamClient is the client API for Stream 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 NewStreamClient

func NewStreamClient(cc grpc.ClientConnInterface) StreamClient

type StreamServer

type StreamServer interface {
	Conn(Stream_ConnServer) error
	// contains filtered or unexported methods
}

StreamServer is the server API for Stream service. All implementations must embed UnimplementedStreamServer for forward compatibility

type Stream_ConnClient

type Stream_ConnClient interface {
	Send(*wrapperspb.BytesValue) error
	Recv() (*wrapperspb.BytesValue, error)
	grpc.ClientStream
}

type Stream_ConnServer

type Stream_ConnServer interface {
	Send(*wrapperspb.BytesValue) error
	Recv() (*wrapperspb.BytesValue, error)
	grpc.ServerStream
}

type UnimplementedStreamServer

type UnimplementedStreamServer struct {
}

UnimplementedStreamServer must be embedded to have forward compatible implementations.

func (UnimplementedStreamServer) Conn

type UnsafeStreamServer

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

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

Jump to

Keyboard shortcuts

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