Documentation ¶
Overview ¶
Package grpc provides generic functionality for grpc
Package grpc provides generic functionality for grpc ¶
Package grpc provides generic functionality for grpc ¶
Package grpc provides generic functionality for grpc ¶
Package grpc provides generic functionality for grpc ¶
Package grpc provides generic functionality for grpc ¶
Package grpc provides generic functionality for grpc ¶
Package grpc provides generic functionality for grpc
Index ¶
- Variables
- func BidirectionalStream(ctx context.Context, stream ServerStream, concurrency int, ...) (err error)
- func BidirectionalStreamClient(stream ClientStream, dataProvider, newData func() interface{}, ...) (err error)
- type AtomicAddrs
- type CallOption
- type Client
- type ClientConn
- type ClientStream
- type DialOption
- type Option
- func WithAddrs(addrs ...string) Option
- func WithBackoff(bo backoff.Backoff) Option
- func WithBackoffBaseDelay(dur string) Option
- func WithBackoffJitter(j float64) Option
- func WithBackoffMaxDelay(dur string) Option
- func WithBackoffMultiplier(m float64) Option
- func WithCallOptions(opts ...grpc.CallOption) Option
- func WithConnectionPoolRebalanceDuration(dur string) Option
- func WithConnectionPoolSize(size int) Option
- func WithDialOptions(opts ...grpc.DialOption) Option
- func WithDialTimeout(dur string) Option
- func WithDialer(der net.Dialer) Option
- func WithEnableConnectionPoolRebalance(flg bool) Option
- func WithErrGroup(eg errgroup.Group) Option
- func WithHealthCheckDuration(dur string) Option
- func WithInitialConnectionWindowSize(size int) Option
- func WithInitialWindowSize(size int) Option
- func WithInsecure(flg bool) Option
- func WithKeepaliveParams(t, to string, permitWithoutStream bool) Option
- func WithMaxMsgSize(size int) Option
- func WithMaxRecvMsgSize(size int) Option
- func WithMaxRetryRPCBufferSize(size int) Option
- func WithMaxSendMsgSize(size int) Option
- func WithMinConnectTimeout(dur string) Option
- func WithOldConnCloseDuration(dur string) Option
- func WithReadBufferSize(size int) Option
- func WithResolveDNS(flg bool) Option
- func WithTLSConfig(cfg *tls.Config) Option
- func WithWaitForReady(flg bool) Option
- func WithWriteBufferSize(size int) Option
- type Server
- type ServerOption
- func ConnectionTimeout(d time.Duration) ServerOption
- func Creds(c credentials.TransportCredentials) ServerOption
- func HeaderTableSize(size uint32) ServerOption
- func InitialConnWindowSize(size int32) ServerOption
- func InitialWindowSize(size int32) ServerOption
- func KeepaliveParams(kp keepalive.ServerParameters) ServerOption
- func MaxHeaderListSize(size uint32) ServerOption
- func MaxRecvMsgSize(size int) ServerOption
- func MaxSendMsgSize(size int) ServerOption
- func ReadBufferSize(size int) ServerOption
- func WriteBufferSize(size int) ServerOption
- type ServerStream
- type StreamHandler
- type StreamServerInfo
- type StreamServerInterceptor
- type UnaryHandler
- type UnaryServerInfo
- type UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StatsHandler = grpc.StatsHandler WithStatsHandler = grpc.WithStatsHandler )
View Source
var ( UnaryInterceptor = grpc.UnaryInterceptor ChainUnaryInterceptor = grpc.ChainUnaryInterceptor StreamInterceptor = grpc.StreamInterceptor ChainStreamInterceptor = grpc.ChainStreamInterceptor )
View Source
var ErrServerStopped = grpc.ErrServerStopped
Functions ¶
func BidirectionalStream ¶
func BidirectionalStream(ctx context.Context, stream ServerStream, concurrency int, newData func() interface{}, f func(context.Context, interface{}) (interface{}, error)) (err error)
BidirectionalStream represents gRPC bidirectional stream server handler.
func BidirectionalStreamClient ¶ added in v0.0.25
func BidirectionalStreamClient(stream ClientStream, dataProvider, newData func() interface{}, f func(interface{}, error)) (err error)
BidirectionalStreamClient is gRPC client stream.
Types ¶
type AtomicAddrs ¶ added in v1.0.0
type CallOption ¶
type CallOption = grpc.CallOption
type Client ¶
type Client interface { StartConnectionMonitor(ctx context.Context) (<-chan error, error) Connect(ctx context.Context, addr string, dopts ...DialOption) (pool.Conn, error) IsConnected(ctx context.Context, addr string) bool Disconnect(ctx context.Context, addr string) error Range(ctx context.Context, f func(ctx context.Context, addr string, conn *ClientConn, copts ...CallOption) error) error RangeConcurrent(ctx context.Context, concurrency int, f func(ctx context.Context, addr string, conn *ClientConn, copts ...CallOption) error) error OrderedRange(ctx context.Context, order []string, f func(ctx context.Context, addr string, conn *ClientConn, copts ...CallOption) error) error OrderedRangeConcurrent(ctx context.Context, order []string, concurrency int, f func(ctx context.Context, addr string, conn *ClientConn, copts ...CallOption) error) error Do(ctx context.Context, addr string, f func(ctx context.Context, conn *ClientConn, copts ...CallOption) (interface{}, error)) (interface{}, error) RoundRobin(ctx context.Context, f func(ctx context.Context, conn *ClientConn, copts ...CallOption) (interface{}, error)) (interface{}, error) GetDialOption() []DialOption GetCallOption() []CallOption ConnectedAddrs() []string Close(ctx context.Context) error }
type ClientConn ¶
type ClientConn = pool.ClientConn
type ClientStream ¶ added in v0.0.27
type ClientStream = grpc.ClientStream
type DialOption ¶
type DialOption = pool.DialOption
type Option ¶
type Option func(*gRPCClient)
func WithBackoff ¶
func WithBackoffBaseDelay ¶ added in v1.0.0
func WithBackoffJitter ¶ added in v1.0.0
func WithBackoffMaxDelay ¶ added in v1.0.0
func WithBackoffMultiplier ¶ added in v1.0.0
func WithCallOptions ¶
func WithCallOptions(opts ...grpc.CallOption) Option
func WithConnectionPoolRebalanceDuration ¶ added in v0.0.27
func WithConnectionPoolSize ¶ added in v0.0.27
func WithDialOptions ¶
func WithDialOptions(opts ...grpc.DialOption) Option
func WithDialTimeout ¶
func WithDialer ¶
func WithEnableConnectionPoolRebalance ¶ added in v0.0.27
func WithErrGroup ¶
func WithHealthCheckDuration ¶
func WithInitialWindowSize ¶
func WithInsecure ¶
func WithKeepaliveParams ¶
func WithMaxMsgSize ¶
func WithMaxRecvMsgSize ¶
func WithMaxSendMsgSize ¶
func WithMinConnectTimeout ¶ added in v1.0.0
func WithOldConnCloseDuration ¶ added in v0.0.29
func WithReadBufferSize ¶
func WithResolveDNS ¶ added in v0.0.45
func WithTLSConfig ¶
func WithWaitForReady ¶
func WithWriteBufferSize ¶
type ServerOption ¶ added in v0.0.27
type ServerOption = grpc.ServerOption
func ConnectionTimeout ¶ added in v1.0.0
func ConnectionTimeout(d time.Duration) ServerOption
func Creds ¶ added in v1.0.0
func Creds(c credentials.TransportCredentials) ServerOption
func HeaderTableSize ¶ added in v1.0.0
func HeaderTableSize(size uint32) ServerOption
func InitialConnWindowSize ¶ added in v1.0.0
func InitialConnWindowSize(size int32) ServerOption
func InitialWindowSize ¶ added in v1.0.0
func InitialWindowSize(size int32) ServerOption
func KeepaliveParams ¶ added in v1.0.0
func KeepaliveParams(kp keepalive.ServerParameters) ServerOption
func MaxHeaderListSize ¶ added in v1.0.0
func MaxHeaderListSize(size uint32) ServerOption
func MaxRecvMsgSize ¶ added in v1.0.0
func MaxRecvMsgSize(size int) ServerOption
func MaxSendMsgSize ¶ added in v1.0.0
func MaxSendMsgSize(size int) ServerOption
func ReadBufferSize ¶ added in v1.0.0
func ReadBufferSize(size int) ServerOption
func WriteBufferSize ¶ added in v1.0.0
func WriteBufferSize(size int) ServerOption
type ServerStream ¶ added in v1.0.0
type ServerStream = grpc.ServerStream
type StreamHandler ¶ added in v1.0.0
type StreamHandler = grpc.StreamHandler
type StreamServerInfo ¶ added in v1.0.0
type StreamServerInfo = grpc.StreamServerInfo
type StreamServerInterceptor ¶ added in v0.0.39
type StreamServerInterceptor = grpc.StreamServerInterceptor
type UnaryHandler ¶ added in v1.0.0
type UnaryHandler = grpc.UnaryHandler
type UnaryServerInfo ¶ added in v1.0.0
type UnaryServerInfo = grpc.UnaryServerInfo
type UnaryServerInterceptor ¶ added in v0.0.39
type UnaryServerInterceptor = grpc.UnaryServerInterceptor
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package codes provides status codes of grpc
|
Package codes provides status codes of grpc |
Package credentials provides generic functionality for grpc credentials setting
|
Package credentials provides generic functionality for grpc credentials setting |
Package errdetails provides error detail for grpc status
|
Package errdetails provides error detail for grpc status |
Package health provides generic functionality for grpc health checks.
|
Package health provides generic functionality for grpc health checks. |
interceptor
|
|
server/logging
Package logging provides gRPC interceptors for access logging
|
Package logging provides gRPC interceptors for access logging |
server/recover
Package recover provides gRPC interceptors for recovery
|
Package recover provides gRPC interceptors for recovery |
server/trace
Package trace provides gRPC interceptors for traces
|
Package trace provides gRPC interceptors for traces |
Package keepalive provides grpc keepalive configuration
|
Package keepalive provides grpc keepalive configuration |
Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc
|
Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc Package metric provides metrics functions for grpc |
Package pool provides grpc connection pool client Package pool provides grpc connection pool client
|
Package pool provides grpc connection pool client Package pool provides grpc connection pool client |
Package proto provides proto file logic
|
Package proto provides proto file logic |
Package reflection provides grpc reflection for providing grpc server proto specs
|
Package reflection provides grpc reflection for providing grpc server proto specs |
Package status provides statuses and errors returned by grpc handler functions
|
Package status provides statuses and errors returned by grpc handler functions |
Package types provides alias of protobuf library types
|
Package types provides alias of protobuf library types |
Click to show internal directories.
Click to hide internal directories.