Documentation ¶
Index ¶
- Variables
- type Endpoint
- type Route
- type Router
- func (r *Router) AddService(service *registry.ServiceInstance) error
- func (r *Router) FindGateEndpoint(insID string) (*Endpoint, error)
- func (r *Router) FindNodeEndpoint(insID string) (*Endpoint, error)
- func (r *Router) FindNodeRoute(routeID int32) (*Route, error)
- func (r *Router) RangeGateEndpoint(fn func(insID string, ep *Endpoint) bool)
- func (r *Router) RangeNodeEndpoint(fn func(insID string, ep *Endpoint) bool)
- func (r *Router) RemoveService(service *registry.ServiceInstance)
- func (r *Router) ReplaceServices(services ...*registry.ServiceInstance)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFoundRoute = errors.New("not found route") ErrNotFoundEndpoint = errors.New("not found endpoint") )
Functions ¶
This section is empty.
Types ¶
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
func (*Route) FindEndpoint ¶
FindEndpoint 查询路由服务端口
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) AddService ¶
func (r *Router) AddService(service *registry.ServiceInstance) error
AddService 添加服务实例
func (*Router) FindGateEndpoint ¶
FindGateEndpoint 查找网关服务端口
func (*Router) FindNodeEndpoint ¶
FindNodeEndpoint 查找节点服务端口
func (*Router) FindNodeRoute ¶
FindNodeRoute 查找节点路由
func (*Router) RangeGateEndpoint ¶
RangeGateEndpoint 轮询网关服务端口
func (*Router) RangeNodeEndpoint ¶
RangeNodeEndpoint 轮询网关服务端口
func (*Router) RemoveService ¶
func (r *Router) RemoveService(service *registry.ServiceInstance)
RemoveService 移除服务实例
func (*Router) ReplaceServices ¶
func (r *Router) ReplaceServices(services ...*registry.ServiceInstance)
ReplaceServices 替换服务实例
Click to show internal directories.
Click to hide internal directories.