counter

package
v16.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepositoryCounter

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

RepositoryCounter provides metrics with a count of repositories present on a Gitaly node.

func NewRepositoryCounter

func NewRepositoryCounter(storages []config.Storage) *RepositoryCounter

NewRepositoryCounter constructs a RepositoryCounter object.

func (*RepositoryCounter) Collect

func (c *RepositoryCounter) Collect(metrics chan<- prometheus.Metric)

Collect is used to collect Prometheus metrics.

func (*RepositoryCounter) Decrement

func (c *RepositoryCounter) Decrement(repo storage.Repository)

Decrement decreases the repository count by one.

func (*RepositoryCounter) DeleteStorage

func (c *RepositoryCounter) DeleteStorage(storageName string)

DeleteStorage removes metrics associated with a storage.

func (*RepositoryCounter) Describe

func (c *RepositoryCounter) Describe(descs chan<- *prometheus.Desc)

Describe is used to describe Prometheus metrics.

func (*RepositoryCounter) Increment

func (c *RepositoryCounter) Increment(repo storage.Repository)

Increment increases the repository count by one.

func (*RepositoryCounter) StartCountingRepositories

func (c *RepositoryCounter) StartCountingRepositories(
	ctx context.Context,
	locator storage.Locator,
	logger log.Logger,
)

StartCountingRepositories counts the number of repositories on disk in a goroutine.

Jump to

Keyboard shortcuts

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