storageapi

package
v1.147.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 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 storageapi is the admin REST surface for storage capacity (#2148): every store the platform writes to, used and free, with its growth and when it would fill, and a store's history for its chart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(mux *http.ServeMux, wrap func(http.Handler) http.Handler, svc Service)

Register mounts the routes behind wrap, the admin API's authentication. A nil service mounts nothing.

Types

type HistoryView

type HistoryView struct {
	Store  string             `json:"store"`
	Days   int                `json:"days"`
	Points []storagecap.Point `json:"points"`
}

HistoryView is a store's samples.

type Service

type Service interface {
	Report(ctx context.Context) (storagecap.Report, error)
	History(ctx context.Context, store string, days int) ([]storagecap.Point, error)
}

Service is what the routes read. *storagecap.Service satisfies it.

Jump to

Keyboard shortcuts

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