grpc

package
v0.3.1-rc.12 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 18 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 New

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() *Grpc

func NewServer

func NewServer(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