storage

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DownloadFilePrefix is prefix of download file name.
	DownloadFilePrefix = "download"

	// NetworkTopologyFilePrefix is prefix of network topology file name.
	NetworkTopologyFilePrefix = "networktopology"

	// CSVFileExt is extension of file name.
	CSVFileExt = "csv"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// ListDownload returns downloads in csv files based on the given model key.
	ListDownload(string) ([]schedulerstorage.Download, error)

	// ListNetworkTopology returns network topologies in csv files based on the given model key.
	ListNetworkTopology(string) ([]schedulerstorage.NetworkTopology, error)

	// OpenDownload opens download files for read based on the given model key, it returns io.ReadCloser of download files.
	OpenDownload(string) (*os.File, error)

	// OpenNetworkTopology opens network topology files for read based on the given model key, it returns io.ReadCloser of network topology files.
	OpenNetworkTopology(string) (*os.File, error)

	// ClearDownload removes all downloads based on the given model key.
	ClearDownload(string) error

	// ClearNetworkTopology removes network topologies based on the given model key.
	ClearNetworkTopology(string) error

	// Clear removes all files.
	Clear() error
}

Storage is the interface used for storage.

func New

func New(baseDir string) Storage

New returns a new Storage instance.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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