Versions in this module Expand all Collapse all v1 v1.0.1 Jun 16, 2021 v1.0.0 Jun 11, 2021 Changes in this version + var WithDialOption = internal.WithDialOption + var WithTimeout = internal.WithTimeout + var WithUnaryClientInterceptor = internal.WithUnaryClientInterceptor + type Client = internal.Client + func MustNewClient(c RpcClientConf, options ...ClientOption) Client + func NewClient(c RpcClientConf, options ...ClientOption) (Client, error) + func NewClientNoAuth(c discov.EtcdConf, opts ...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 + Timeout int64 + Token string + func NewDirectClientConf(endpoints []string, app, token string) RpcClientConf + func NewEtcdClientConf(hosts []string, key, app, token string) RpcClientConf + 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 + ListenOn string + Redis redis.RedisKeyConf + StrictControl bool + Timeout int64 + func (sc RpcServerConf) HasEtcd() bool + func (sc RpcServerConf) Validate() error