executor

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-3.0 Imports: 16 Imported by: 10

Documentation

Overview

Copyright (C) 2021 Daniele Rondina <geaaru@sabayonlinux.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2021-2023 Daniele Rondina <geaaru@gmail.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2021-2023 Daniele Rondina <geaaru@gmail.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2021 Daniele Rondina <geaaru@sabayonlinux.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultTarFormers added in v0.3.0

func SetDefaultTarFormers(t *TarFormers)

Types

type TarFileHandlerFunc added in v0.3.0

type TarFileHandlerFunc func(path, dst string,
	header *tar.Header, content io.Reader,
	opts *TarFileOperation, t *TarFormers) error

Function handler to

type TarFileOperation added in v0.3.0

type TarFileOperation struct {
	Rename  bool
	NewName string
	Skip    bool
}

type TarFileWriterHandlerFunc added in v0.7.0

type TarFileWriterHandlerFunc func(path, newpath string,
	header *tar.Header, tw *tar.Writer,
	opts *TarFileOperation, t *TarFormers) error

type TarFormers

type TarFormers struct {
	Config *specs.Config `yaml:"config" json:"config"`
	Logger *log.Logger   `yaml:"-" json:"-"`

	Task       *specs.SpecFile `yaml:"task,omitempty" json:"task,omitempty"`
	TaskWriter *specs.SpecFile `yaml:"task_writer,omitempty" json:"task_writer,omitempty"`

	Ctx *context.Context

	FlushErrs []error
	// contains filtered or unexported fields
}

func GetOptimusPrime added in v0.3.0

func GetOptimusPrime() *TarFormers

func NewTarFormers

func NewTarFormers(config *specs.Config) *TarFormers

func NewTarFormersWithLog added in v0.3.4

func NewTarFormersWithLog(config *specs.Config, defLog bool) *TarFormers

func (*TarFormers) CreateBlockCharFifo

func (t *TarFormers) CreateBlockCharFifo(file string, mode os.FileMode, header *tar.Header) error

func (*TarFormers) CreateDir

func (t *TarFormers) CreateDir(dir string, mode os.FileMode) (bool, error)

func (*TarFormers) CreateFile

func (t *TarFormers) CreateFile(dir, name string, mode os.FileMode, reader io.Reader, header *tar.Header) error
func (t *TarFormers) CreateLink(link specs.Link) error

func (*TarFormers) ExistFile added in v0.2.0

func (t *TarFormers) ExistFile(path string) (bool, error)

func (*TarFormers) GetXattr added in v0.5.0

func (t *TarFormers) GetXattr(path string) (map[string]string, error)

func (*TarFormers) HandleTarFlow

func (t *TarFormers) HandleTarFlow(tarReader *tar.Reader, dir string) error

func (*TarFormers) HandleTarFlowWriter added in v0.7.0

func (t *TarFormers) HandleTarFlowWriter(tarWriter *tar.Writer) error

func (*TarFormers) HandlerTarBridgeFlow added in v0.7.0

func (t *TarFormers) HandlerTarBridgeFlow(
	tarReader *tar.Reader, tarWriter *tar.Writer) error

func (*TarFormers) HasFileHandler added in v0.3.0

func (t *TarFormers) HasFileHandler() bool

func (*TarFormers) HasFileWriterHandler added in v0.7.0

func (t *TarFormers) HasFileWriterHandler() bool

func (*TarFormers) InjectDir2Writer added in v0.5.0

func (t *TarFormers) InjectDir2Writer(tw *tar.Writer,
	dir string,
	iMap *map[inodeResource]string) error

func (*TarFormers) InjectFile2Writer added in v0.5.0

func (t *TarFormers) InjectFile2Writer(tw *tar.Writer,
	file, fnewname string, stat *fs.FileInfo,
	iMap *map[inodeResource]string) error

func (*TarFormers) RunTask

func (t *TarFormers) RunTask(task *specs.SpecFile, dir string) error

func (*TarFormers) RunTaskBridge added in v0.7.0

func (t *TarFormers) RunTaskBridge(in, out *specs.SpecFile) error

func (*TarFormers) RunTaskWriter added in v0.7.0

func (t *TarFormers) RunTaskWriter(task *specs.SpecFile) error

func (*TarFormers) SetFileHandler added in v0.3.0

func (t *TarFormers) SetFileHandler(f TarFileHandlerFunc)

func (*TarFormers) SetFileProps

func (t *TarFormers) SetFileProps(path string, meta *specs.FileMeta, link bool) error

func (*TarFormers) SetFileWriterHandler added in v0.7.0

func (t *TarFormers) SetFileWriterHandler(f TarFileWriterHandlerFunc)

func (*TarFormers) SetReader

func (t *TarFormers) SetReader(reader io.Reader)

func (*TarFormers) SetWriter added in v0.5.0

func (t *TarFormers) SetWriter(writer io.Writer)

func (*TarFormers) SetXattrAttr added in v0.3.0

func (t *TarFormers) SetXattrAttr(path, k, v string, flag int) error

Jump to

Keyboard shortcuts

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