Documentation ¶ Index ¶ type Gate func NewGate(opts ...Option) *Gate func (g *Gate) Destroy() func (g *Gate) Init() func (g *Gate) Name() string func (g *Gate) Start() type Option func WithContext(ctx context.Context) Option func WithID(id string) Option func WithLocator(locator locate.Locator) Option func WithName(name string) Option func WithRegistry(r registry.Registry) Option func WithServer(server network.Server) Option func WithTimeout(timeout time.Duration) Option Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Gate ¶ type Gate struct { component.Base // contains filtered or unexported fields } func NewGate ¶ func NewGate(opts ...Option) *Gate func (*Gate) Destroy ¶ func (g *Gate) Destroy() Destroy 销毁组件 func (*Gate) Init ¶ func (g *Gate) Init() Init 初始化 func (*Gate) Name ¶ func (g *Gate) Name() string Name 组件名称 func (*Gate) Start ¶ func (g *Gate) Start() Start 启动组件 type Option ¶ type Option func(o *options) func WithContext ¶ func WithContext(ctx context.Context) Option WithContext 设置上下文 func WithID ¶ func WithID(id string) Option WithID 设置实例ID func WithLocator ¶ func WithLocator(locator locate.Locator) Option WithLocator 设置用户定位器 func WithName ¶ func WithName(name string) Option WithName 设置实例名称 func WithRegistry ¶ func WithRegistry(r registry.Registry) Option WithRegistry 设置服务注册器 func WithServer ¶ func WithServer(server network.Server) Option WithServer 设置服务器 func WithTimeout ¶ func WithTimeout(timeout time.Duration) Option WithTimeout 设置RPC调用超时时间 Source Files ¶ View all Source files gate.go options.go provider.go proxy.go Click to show internal directories. Click to hide internal directories.