storage

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BAD = ".bad"
	XML = ".xml"
)
View Source
const (
	LevelClassic  = "classic" // instance+type+mode+source
	LevelUPI      = "upi"
	LevelSource   = "source"
	LevelInstance = "instance" // OPS, SIM1, SIM2, TEST
	LevelType     = "type"     // images, sciences
	LevelMode     = "mode"     // realtime, playback
	LevelYear     = "year"
	LevelDay      = "doy"
	LevelHour     = "hour"
	LevelMin      = "minute"
	LevelVMUTime  = "vmu" // vmu: year+doy+hour+min
	LevelACQTime  = "acq" // acq: year+doy+hour+min
)
View Source
const TAR = ".tar"

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

type Control struct {
	Type   string   `toml:"type"`
	Accept []string `toml:"accept"`
	Reject []string `toml:"reject"`
}

func (*Control) Can

func (c *Control) Can(p panda.HRPacket) bool

type Directory

type Directory interface {
	Prepare(uint8, panda.HRPacket) (string, error)
}

func NewDirectory

func NewDirectory(base, time string, levels []string, interval int) Directory

type Options

type Options struct {
	Scheme   string `toml:"type"`
	Location string `toml:"location"`
	Format   string `toml:"format"`
	Compress bool   `toml:"compress"`
	KeepBad  bool   `toml:"keep-bad"`

	Control `toml:"control"`

	// rolling option
	Interval int `toml:"interval"`
	Timeout  int `toml:"timeout"`
	MaxSize  int `toml:"maxsize"`
	MaxCount int `toml:"maxcount"`

	Epoch  string     `toml:"time"`
	Levels []string   `toml:"levels"`
	Shares []*Options `toml:"share"`

	Link string `toml:"link"`
}

type Storage

type Storage interface {
	Store(uint8, panda.HRPacket) error
}

func Multistore

func Multistore(s ...Storage) Storage

func NewArchiveStorage

func NewArchiveStorage(o Options) (Storage, error)

func NewHRDPStorage

func NewHRDPStorage(o Options) (Storage, error)

func NewLocalStorage

func NewLocalStorage(o Options) (Storage, error)

Jump to

Keyboard shortcuts

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