cache

package
v0.0.0-...-6700e38 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package cache provides functionality to map DUTs to caching servers.

Copyright 2022 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locator

type Locator struct {
	// contains filtered or unexported fields
}

Locator helps to find a caching server for any given DUT. It tries to use UFS zone and falls back to subnets to match the given DUT with a caching server. It caches intermediate results, e.g. IP addresses, UFS zones, etc.

func NewLocator

func NewLocator() *Locator

func (*Locator) FindCacheServer

func (l *Locator) FindCacheServer(dutName string, client ufsapi.FleetClient) (*labapi.IpEndpoint, error)

FindCacheServer returns the ip address of a cache server mapped to a dut.

func (*Locator) SetPreferredServices

func (l *Locator) SetPreferredServices(services []string) error

SetPreferredServices sets preferred services form a string slice.

type Subnet

type Subnet struct {
	IPNet    *net.IPNet
	Backends []address
}

Subnet is a network in labs (i.e. test VLAN). DUTs can only access caching backends in the same Subnet.

Jump to

Keyboard shortcuts

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