manifest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 12 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

Index

Constants

View Source
const (
	Name    = "manifest.json"
	Version = 1
)

Variables

This section is empty.

Functions

func ServiceDir

func ServiceDir(name string) string

ServiceDir keeps untrusted service names off the filesystem as paths; the hash separates names that slug alike.

func SyncDir

func SyncDir(path string) (err error)

func Write

func Write(tmpDir, path string, m Manifest) error

Write renames a fully synced copy over path, so readers never see a partial manifest.

Types

type File

type File struct {
	Path    string    `json:"path"`
	Signal  string    `json:"signal"`
	Rows    int64     `json:"rows"`
	Bytes   int64     `json:"bytes"`
	MinTime time.Time `json:"min_time,omitzero"`
	MaxTime time.Time `json:"max_time,omitzero"`
}

type Loaded

type Loaded struct {
	Dir      string
	Manifest Manifest
}

func Glob

func Glob(dataDir string) ([]Loaded, error)

Glob reads every service manifest under dataDir; a missing services dir means none.

type Manifest

type Manifest struct {
	SchemaVersion int       `json:"schema_version"`
	ServiceName   string    `json:"service_name"`
	Generation    int64     `json:"generation"`
	Files         []File    `json:"files"`
	Retired       []Retired `json:"retired,omitempty"`
}

func Read

func Read(path string) (Manifest, error)

type Retired

type Retired struct {
	Path        string    `json:"path"`
	DeleteAfter time.Time `json:"delete_after"`
}

Jump to

Keyboard shortcuts

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