persistence

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataFile

type DataFile struct {
	// The path prefix.
	Prefix string
	// Datatype component of the path.
	Datatype string
	// Subtest component of the path.
	Subtest string
	// UUID of this measurement file.
	UUID string
	// The size of this data file on disk, in bytes.
	Size int

	// The relative file path, generated according to the provided prefix,
	// datatype, subtest, uuid and the timestamp at generation time.
	Path string
}

DataFile is the file where we save measurements.

func WriteDataFile

func WriteDataFile(prefix, datatype, subtest, uuid string,
	data interface{}) (*DataFile, error)

WriteDataFile creates a new JSON output file containing the representation of the data struct.

The path is determined by the provided prefix, datatype, subtest and uuid.

Jump to

Keyboard shortcuts

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