storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClosed error for read/write in cloased storage
	ErrClosed = errors.New("storage already closed")
)

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Open(path string) (io.ReadWriteCloser, error)
}

Storage storage interface

func NewStorage

func NewStorage(t Type) Storage

NewStorage create new storage by type

type Type

type Type int

Type storage type

const (
	// DiskStorage disk storage
	DiskStorage Type = 1 << iota
	// MemoryStorage memory storage
	MemoryStorage
)

Jump to

Keyboard shortcuts

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