inventory

package
v0.3.0-rc.53 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 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

Overview

Package inventory checks that every CDN node is serving: a probe location that runs on a CDN node names the node's address and the DNS name of its cluster (the rotation), and every minute both are resolved. A node whose address is not among the rotation's answers has been taken out (a health check, a traffic limit, a mistake), even though the machine is up and still probing; an address in the rotation that belongs to no location is a node nobody watches. Both are exported for alert rules. Nothing here needs the CDN's API or credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	Catalog  func() *catalog.Catalog
	Resolver *net.Resolver
	Now      func() time.Time
	// contains filtered or unexported fields
}

Checker resolves the rotations and the nodes' addresses. Resolver nil is the system's resolver.

func (*Checker) Check

func (c *Checker) Check(ctx context.Context)

Check resolves everything once and keeps the result for Samples.

func (*Checker) Register

func (c *Checker) Register(m *metrics.Metrics)

Register exports the last check's results.

func (*Checker) Run

func (c *Checker) Run(ctx context.Context)

Run checks every minute until ctx ends.

Jump to

Keyboard shortcuts

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