Documentation ¶
Index ¶
- type Key
- type Route
- func (r *Route) AddClient(cl client.Client) error
- func (r *Route) BeRule() *config.BackendRule
- func (r *Route) ForEachPool(cb func(pool.Pool) error) error
- func (r *Route) FrRule() *config.FrontendRule
- func (r *Route) NofityClients(cb func(cl client.ClientInfo) error) error
- func (r *Route) Params() (shard.ParameterSet, error)
- func (r *Route) ReleaseClient(clientID uint) (bool, error)
- func (r *Route) ServPool() *pool.DBPool
- func (r *Route) SetParams(ps shard.ParameterSet)
- type RouteMgr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Route ¶
type Route struct { pool.PoolIterator // contains filtered or unexported fields }
func NewRoute ¶
func NewRoute(beRule *config.BackendRule, frRule *config.FrontendRule, mapping map[string]*config.Shard) *Route
func (*Route) BeRule ¶
func (r *Route) BeRule() *config.BackendRule
func (*Route) FrRule ¶
func (r *Route) FrRule() *config.FrontendRule
func (*Route) NofityClients ¶
func (r *Route) NofityClients(cb func(cl client.ClientInfo) error) error
type RouteMgr ¶
type RouteMgr interface { // Parse and analyze user query, and decide which shard routes // will participate in query execturion Reroute() error // Acquire (prepare) connection to any random shard route // Without any user query analysis RerouteToRandomRoute() error RerouteToTargetRoute(route *routingstate.DataShardRoute) error CurrentRoutes() []*routingstate.DataShardRoute /* Unroute Routines */ UnRouteWithError(shkey []kr.ShardKey, errmsg error) error Unroute(shkey []kr.ShardKey) error UnrouteRoutes(routes []*routingstate.DataShardRoute) error }
Click to show internal directories.
Click to hide internal directories.