Documentation ¶
Index ¶
- func Dial(ctx context.Context, opts ...ClientOption) (*grpc.ClientConn, error)
- func DialInsecure(ctx context.Context, opts ...ClientOption) (*grpc.ClientConn, error)
- func NewWrappedStream(ctx context.Context, stream grpc.ServerStream) grpc.ServerStream
- type ClientOption
- func WithDiscovery(d registry.Discovery) ClientOption
- func WithEndpoint(endpoint string) ClientOption
- func WithMiddleware(m ...middleware.Middleware) ClientOption
- func WithNodeFilter(filters ...selector.NodeFilter) ClientOption
- func WithOptions(opts ...grpc.DialOption) ClientOption
- func WithTLSConfig(c *tls.Config) ClientOption
- func WithTimeout(timeout time.Duration) ClientOption
- func WithUnaryInterceptor(in ...grpc.UnaryClientInterceptor) ClientOption
- type Server
- type ServerOption
- type Trailer
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(ctx context.Context, opts ...ClientOption) (*grpc.ClientConn, error)
func DialInsecure ¶
func DialInsecure(ctx context.Context, opts ...ClientOption) (*grpc.ClientConn, error)
func NewWrappedStream ¶
func NewWrappedStream(ctx context.Context, stream grpc.ServerStream) grpc.ServerStream
Types ¶
type ClientOption ¶
type ClientOption func(*clientOptions)
func WithDiscovery ¶
func WithDiscovery(d registry.Discovery) ClientOption
WithDiscovery with client discovery.
func WithEndpoint ¶
func WithEndpoint(endpoint string) ClientOption
WithEndpoint with client endpoint.
func WithMiddleware ¶
func WithMiddleware(m ...middleware.Middleware) ClientOption
WithMiddleware with client middleware.
func WithNodeFilter ¶
func WithNodeFilter(filters ...selector.NodeFilter) ClientOption
WithNodeFilter with select filters
func WithOptions ¶
func WithOptions(opts ...grpc.DialOption) ClientOption
WithOptions with gRPC options.
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout with client timeout.
func WithUnaryInterceptor ¶
func WithUnaryInterceptor(in ...grpc.UnaryClientInterceptor) ClientOption
WithUnaryInterceptor returns a DialOption that specifies the interceptor for unary RPCs.
type Server ¶
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
func (*Server) Use ¶
func (s *Server) Use(selector string, m ...middleware.Middleware)
type ServerOption ¶
type ServerOption func(o *Server)
func Address ¶
func Address(addr string) ServerOption
func Network ¶
func Network(network string) ServerOption
func Timeout ¶
func Timeout(timeout time.Duration) ServerOption
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func (*Transport) NodeFilters ¶
func (tr *Transport) NodeFilters() []selector.NodeFilter
func (*Transport) ReplyHeader ¶
func (*Transport) RequestHeader ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.