grpc

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientBinding

type ClientBinding struct {
	Unary       endpoint.Unary[service.EchoRequest, service.EchoResponse]
	InnerStream endpoint.InnerStream[service.EchoRequest, service.EchoResponse]
	OuterStream endpoint.OuterStream[service.EchoRequest, service.EchoResponse]
	BiStream    endpoint.BiStream[service.EchoRequest, service.EchoResponse]
}

func NewClientBinding

func NewClientBinding(cc *grpc.ClientConn, opts ...kitgrpc.ClientOption) *ClientBinding

type ServerBinding

type ServerBinding struct {
	pb.UnimplementedEchoServer
	// contains filtered or unexported fields
}

func NewServerBinding

func NewServerBinding(svc Service, opts ...kitgrpc.ServerOption) *ServerBinding

func (ServerBinding) BiStream

func (sb ServerBinding) BiStream(s pb.Echo_BiStreamServer) error

func (ServerBinding) InnerStream

func (sb ServerBinding) InnerStream(req *pb.EchoRequest, s pb.Echo_InnerStreamServer) error

func (ServerBinding) OuterStream

func (sb ServerBinding) OuterStream(s pb.Echo_OuterStreamServer) error

func (ServerBinding) Unary

func (sb ServerBinding) Unary(ctx context.Context, req *pb.EchoRequest) (*pb.EchoResponse, error)

type Service

type Service interface {
	Once(ctx context.Context, req service.EchoRequest) (service.EchoResponse, error)
	Inner(ctx context.Context, req service.EchoRequest) (endpoint.Receive[service.EchoResponse], error)
	Outer(ctx context.Context, receiver <-chan service.EchoRequest) (service.EchoResponse, error)
	Bi(ctx context.Context, receiver <-chan service.EchoRequest) (endpoint.Receive[service.EchoResponse], error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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