Documentation ¶
Index ¶
- Constants
- func Dial(addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func DialContext(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func DialContextWithEtcd(ctx context.Context, serviceName string, cli *goo_etcd.Client) (*grpc.ClientConn, error)
- func DialWithEtcd(serviceName string, cli *goo_etcd.Client) (*grpc.ClientConn, error)
- type AuthFunc
- type Config
- type PProf
- type Server
- type ServerOption
Constants ¶
View Source
const ( MaxRecvMsgSize = 20 * 1024 * 1024 MaxSendMsgSize = 20 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func DialContext ¶ added in v1.1.72
func DialContext(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func DialContextWithEtcd ¶ added in v1.1.72
func DialWithEtcd ¶ added in v1.0.2
Types ¶
type Server ¶
func New ¶
func New(conf Config, opt ...ServerOption) *Server
func (*Server) Register2Etcd ¶ added in v1.0.2
type ServerOption ¶ added in v1.1.1
type ServerOption interface {
// contains filtered or unexported methods
}
定义配置项抽象
func AuthFuncOption ¶ added in v1.1.1
func AuthFuncOption(authFunc AuthFunc) ServerOption
配置项 - 认证方法
func ServerOptions ¶ added in v1.1.1
func ServerOptions(opt ...grpc.ServerOption) ServerOption
配置项 - grpc server options
Click to show internal directories.
Click to hide internal directories.