Documentation ¶
Index ¶
- func GetTransportFromGrpcClient(ctx context.Context, method string, cc *grpc.ClientConn, header header.IHeader) transport.ITransport
- func NewWrappedStream(ctx context.Context, stream grpc.ServerStream) grpc.ServerStream
- func NewXDSConn(dsn string) (*grpc.ClientConn, error)
- type Server
- type ServerOption
- func Address(addr string) ServerOption
- func Credentials(creds credentials.TransportCredentials) ServerOption
- func Debug() ServerOption
- func EnableHealth() ServerOption
- func Name(name string) ServerOption
- func Network(network string) ServerOption
- func Options(opts ...grpc.ServerOption) ServerOption
- func StreamInterceptor(in ...grpc.StreamServerInterceptor) ServerOption
- func TLSConfig(c *tls.Config) ServerOption
- func UnaryInterceptor(in ...grpc.UnaryServerInterceptor) ServerOption
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTransportFromGrpcClient ¶
func GetTransportFromGrpcClient(ctx context.Context, method string, cc *grpc.ClientConn, header header.IHeader) transport.ITransport
func NewWrappedStream ¶
func NewWrappedStream(ctx context.Context, stream grpc.ServerStream) grpc.ServerStream
func NewXDSConn ¶
func NewXDSConn(dsn string) (*grpc.ClientConn, error)
NewXDSConn new a connection of xDs Note: call `conn.Close()` when the server exits
Types ¶
type Server ¶
type Server struct { *xds.GRPCServer // contains filtered or unexported fields }
func NewServer ¶
func NewServer(registerFunc func(s grpc.ServiceRegistrar), opts ...ServerOption) *Server
type ServerOption ¶
type ServerOption func(o *Server)
ServerOption is gRPC server option.
func Credentials ¶
func Credentials(creds credentials.TransportCredentials) ServerOption
Credentials with server credentials.
func Debug ¶
func Debug() ServerOption
func StreamInterceptor ¶
func StreamInterceptor(in ...grpc.StreamServerInterceptor) ServerOption
StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the server.
func UnaryInterceptor ¶
func UnaryInterceptor(in ...grpc.UnaryServerInterceptor) ServerOption
UnaryInterceptor returns a ServerOption that sets the UnaryServerInterceptor for the server.
Click to show internal directories.
Click to hide internal directories.