Versions in this module Expand all Collapse all v1 v1.4.3 Nov 5, 2022 Changes in this version + var WithDialOption = internal.WithDialOption + var WithNonBlock = internal.WithNonBlock + var WithStreamClientInterceptor = internal.WithStreamClientInterceptor + var WithTimeout = internal.WithTimeout + var WithTransportCredentials = internal.WithTransportCredentials + var WithUnaryClientInterceptor = internal.WithUnaryClientInterceptor + func DontLogContentForMethod(method string) + func SetClientSlowThreshold(threshold time.Duration) + func SetServerSlowThreshold(threshold time.Duration) + type Client = internal.Client + func MustNewClient(c RpcClientConf, options ...ClientOption) Client + func NewClient(c RpcClientConf, options ...ClientOption) (Client, error) + func NewClientWithTarget(target string, opts ...ClientOption) (Client, error) + type ClientOption = internal.ClientOption + type RpcClient struct + func (rc *RpcClient) Conn() *grpc.ClientConn + type RpcClientConf struct + App string + Endpoints []string + Etcd discov.EtcdConf + NonBlock bool + Target string + Timeout int64 + Token string + func NewDirectClientConf(endpoints []string, app, token string) RpcClientConf + func NewEtcdClientConf(hosts []string, key, app, token string) RpcClientConf + func (cc RpcClientConf) BuildTarget() (string, error) + func (cc RpcClientConf) HasCredential() bool + type RpcProxy struct + func NewProxy(backend string, opts ...internal.ClientOption) *RpcProxy + func (p *RpcProxy) TakeConn(ctx context.Context) (*grpc.ClientConn, error) + type RpcServer struct + func MustNewServer(c RpcServerConf, register internal.RegisterFn) *RpcServer + func NewServer(c RpcServerConf, register internal.RegisterFn) (*RpcServer, error) + func (rs *RpcServer) AddOptions(options ...grpc.ServerOption) + func (rs *RpcServer) AddStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) + func (rs *RpcServer) AddUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) + func (rs *RpcServer) Start() + func (rs *RpcServer) Stop() + type RpcServerConf struct + Auth bool + CpuThreshold int64 + Etcd discov.EtcdConf + Health bool + ListenOn string + Redis redis.RedisKeyConf + StrictControl bool + Timeout int64 + func (sc RpcServerConf) HasEtcd() bool + func (sc RpcServerConf) Validate() error