route

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RouteForCommonTenant

func RouteForCommonTenant(
	selector clusterservice.Selector, filter func(string) bool, appendFn func(service *metadata.CNService),
)

RouteForCommonTenant selects CN services for common tenant. If there are CN services for the selector, just select them, else, return CN services with empty labels if there are any.

func RouteForSuperTenant

func RouteForSuperTenant(
	selector clusterservice.Selector,
	username string,
	filter func(string) bool,
	appendFn func(service *metadata.CNService),
)

RouteForSuperTenant is used to select CN servers for sys tenant. For sys tenant, there are some special strategies to select CN servers. First of all, the requested labels must be match with the ones on servers. Then, the following strategies are listed in order of priority:

  1. The CN servers which are configured as sys account.
  2. The CN servers which are configured as some labels whose key is not account.
  3. The CN servers which are configured as no labels.
  4. At last, if no CN servers are selected, 4.1 If the username is dump or root, we just select one randomly. 4.2 Else, no servers are selected.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL