infra

package
v0.0.0-...-9649b88 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DirPrefix string = "/dev/shm/"
View Source
const OverlayMode int = 1
View Source
const UnderlayMode int = 2

Variables

View Source
var ErrExecCombinedOutputFailed = errors.New("exec combined output failded")
View Source
var ErrExecLookPathFailed = errors.New("exec lookpath failded")
View Source
var ErrGetRAMDiskFailed = errors.New("get ram disk path failded")
View Source
var ErrJSONMarshalFailed = errors.New("json marshal failded")
View Source
var ErrJSONUnmarshalFailed = errors.New("json unmarshal failded")
View Source
var ErrOsStatFailed = errors.New("os stat failded")
View Source
var ErrReadFileFailed = errors.New("read file failded")
View Source
var ErrWriteFileFailed = errors.New("write file failded")
View Source
var RecoverFlag bool = true

Functions

func Init

func Init()

func IsCTNetPlane

func IsCTNetPlane(netPlane string) bool

func IsEnhancedMode

func IsEnhancedMode() bool

func IsGeneralMode

func IsGeneralMode() bool

func SetMode

func SetMode(m int)

Types

type DataPersister

type DataPersister struct {
	DirName  string
	FileName string
}

func (*DataPersister) GetFilePath

func (this *DataPersister) GetFilePath() string

func (*DataPersister) IsExist

func (this *DataPersister) IsExist() bool

func (*DataPersister) LoadFromMemFile

func (this *DataPersister) LoadFromMemFile(i interface{}) error

To restore data from file

func (*DataPersister) SaveToMemFile

func (this *DataPersister) SaveToMemFile(i interface{}) error

To store data to file

Directories

Path Synopsis
util

Jump to

Keyboard shortcuts

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