tmp

package
v0.0.0-...-d691e2b Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package tmp

Package tmp

Index

Constants

This section is empty.

Variables

View Source
var (
	RunnersTmpPath    = "/var/faas/runner-tmp"
	CodeWorkspacePath = "/var/faas/code-workspace"
	StorageRatio      = 1.5
)

Functions

This section is empty.

Types

type TmpManager

type TmpManager struct {
	// contains filtered or unexported fields
}

func NewTmpManager

func NewTmpManager(o *TmpStorageOption, containerNum int) (manager *TmpManager, err error)

func (*TmpManager) GetTmpStorage

func (m *TmpManager) GetTmpStorage(name string) (path string, err error)

func (*TmpManager) ListTmpPaths

func (m *TmpManager) ListTmpPaths() (paths *[]string, err error)

func (*TmpManager) RemoveTmpStorage

func (m *TmpManager) RemoveTmpStorage(name string) (err error)

func (*TmpManager) SnapshotTmpPaths

func (m *TmpManager) SnapshotTmpPaths() (paths *[]string, err error)

type TmpManagerInterface

type TmpManagerInterface interface {
	GetTmpStorage(name string) (path string, err error)
	RemoveTmpStorage(name string) (err error)
	SnapshotTmpPaths() (paths *[]string, err error)
	ListTmpPaths() (paths *[]string, err error)
}

TmpManagerInterface

type TmpStorageOption

type TmpStorageOption struct {
	TmpStorageType string
	TmpStoragePath string
	TmpStorageName string
	TmpStorageSize int64

	RunnerTmpSize string
}

func NewTmpStorageOption

func NewTmpStorageOption() *TmpStorageOption

func (*TmpStorageOption) AddFlags

func (o *TmpStorageOption) AddFlags(fs *pflag.FlagSet)

Jump to

Keyboard shortcuts

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