Documentation ¶
Index ¶
- type Option
- func WithClientCredentials(certFile string, serverName string) Option
- func WithClientDialOptions(opts ...grpc.DialOption) Option
- func WithClientDiscovery(discovery registry.Discovery) Option
- func WithClientKeepAliveParams(time int, timeout int, permitWithoutStream bool) Option
- func WithClientPoolSize(size int) Option
- func WithServerCredentials(certFile, keyFile string) Option
- func WithServerListenAddr(addr string) Option
- func WithServerOptions(opts ...grpc.ServerOption) Option
- type Transporter
- func (t *Transporter) NewGateClient(ep *endpoint.Endpoint) (transport.GateClient, error)
- func (t *Transporter) NewGateServer(provider transport.GateProvider) (transport.Server, error)
- func (t *Transporter) NewNodeClient(ep *endpoint.Endpoint) (transport.NodeClient, error)
- func (t *Transporter) NewNodeServer(provider transport.NodeProvider) (transport.Server, error)
- func (t *Transporter) NewServiceClient(target string) (transport.ServiceClient, error)
- func (t *Transporter) NewServiceServer() (transport.Server, error)
- func (t *Transporter) SetDefaultDiscovery(discovery registry.Discovery)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *options)
func WithClientCredentials ¶
WithClientCredentials 设置客户端证书和校验域名
func WithClientDialOptions ¶
func WithClientDialOptions(opts ...grpc.DialOption) Option
WithClientDialOptions 设置客户端拨号选项
func WithClientDiscovery ¶
WithClientDiscovery 设置客户端服务发现组件
func WithClientKeepAliveParams ¶
WithClientKeepAliveParams 设置客户端keep alive参数
func WithServerCredentials ¶
WithServerCredentials 设置服务器证书和秘钥
func WithServerListenAddr ¶
WithServerListenAddr 设置服务器监听地址
func WithServerOptions ¶
func WithServerOptions(opts ...grpc.ServerOption) Option
WithServerOptions 设置服务器选项
type Transporter ¶
type Transporter struct {
// contains filtered or unexported fields
}
func NewTransporter ¶
func NewTransporter(opts ...Option) *Transporter
func (*Transporter) NewGateClient ¶
func (t *Transporter) NewGateClient(ep *endpoint.Endpoint) (transport.GateClient, error)
NewGateClient 新建网关客户端
func (*Transporter) NewGateServer ¶
func (t *Transporter) NewGateServer(provider transport.GateProvider) (transport.Server, error)
NewGateServer 新建网关服务器
func (*Transporter) NewNodeClient ¶
func (t *Transporter) NewNodeClient(ep *endpoint.Endpoint) (transport.NodeClient, error)
NewNodeClient 新建节点客户端
func (*Transporter) NewNodeServer ¶
func (t *Transporter) NewNodeServer(provider transport.NodeProvider) (transport.Server, error)
NewNodeServer 新建节点服务器
func (*Transporter) NewServiceClient ¶
func (t *Transporter) NewServiceClient(target string) (transport.ServiceClient, error)
NewServiceClient 新建微服务客户端
func (*Transporter) NewServiceServer ¶
func (t *Transporter) NewServiceServer() (transport.Server, error)
NewServiceServer 新建微服务服务器
func (*Transporter) SetDefaultDiscovery ¶
func (t *Transporter) SetDefaultDiscovery(discovery registry.Discovery)
SetDefaultDiscovery 设置默认的服务发现组件
Click to show internal directories.
Click to hide internal directories.