Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment interface { // Subnets returns the caching subnets. // The slice returned may be shared, so do not modify it. // This function is concurrency safe. Subnets() []Subnet }
Environment is the runtime dependencies, e.g. networking, etc. of the implementation. The main goal of it is for unit test.
func NewUFSEnv ¶
func NewUFSEnv(c ufsapi.FleetClient) (Environment, error)
NewUFSEnv creates an instance of Environment for caching services registered in UFS. It caches the result to prevent frequent access to UFS. It updates the cache regularly.
type Frontend ¶
type Frontend struct {
// contains filtered or unexported fields
}
Frontend manages caching backends and assigns backends for client requests.
func NewFrontend ¶
func NewFrontend(env Environment) *Frontend
NewFrontend creates a new cache frontend.
Click to show internal directories.
Click to hide internal directories.