Documentation
¶
Index ¶
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 WithClientDiscovery ¶
WithClientDiscovery 设置客户端服务发现组件
func WithServerCredentials ¶
WithServerCredentials 设置服务器证书和秘钥
func WithServerListenAddr ¶
WithServerListenAddr 设置RPC服务器监听地址
type Transporter ¶
type Transporter struct {
// contains filtered or unexported fields
}
func NewTransporter ¶
func NewTransporter(opts ...Option) *Transporter
func (*Transporter) NewClient ¶
func (t *Transporter) NewClient(target string) (transport.Client, error)
NewClient 新建传输客户端 target参数可分为三种模式: 服务直连模式: direct://127.0.0.1:8011 服务直连模式: direct://711baf8d-8a06-11ef-b7df-f4f19e1f0070 服务发现模式: discovery://service_name
func (*Transporter) NewServer ¶
func (t *Transporter) NewServer() (transport.Server, error)
NewServer 新建传输服务器
func (*Transporter) SetDefaultDiscovery ¶
func (t *Transporter) SetDefaultDiscovery(discovery registry.Discovery)
SetDefaultDiscovery 设置默认的服务发现组件
Click to show internal directories.
Click to hide internal directories.