Help us shape the future of Go! Take the 2026 Go Developer Survey

storageapi

package
v1.150.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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