cvmfs

package
v0.0.0-...-78b6b4d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTooManyAttempts is the error returned once the maximum number
	// of allowed open transaction attempts is reached
	ErrTooManyAttempts = fmt.Errorf("Too many attempts made to open transaction")
)

Functions

This section is empty.

Types

type Opts

type Opts struct {
	// User with the necessary rights to install
	SudoUser string `json:"sudo_user"`

	// Path to the CVMFS server binary
	Binary string `json:"cvmfs_server_binary"`

	// Name of the nightly repo
	NightlyRepo string `json:"nightly_repo"`

	// Machine with rights to contact the CVMFS gateway node
	ReleaseManager string `json:"release_manager"`

	// How many times we try to open our own CVMFS transaction
	MaxTransactionAttempts int `json:"max_transaction_open_attempts"`
}

Opts configures the CVMFS transaction

type Transaction

type Transaction struct {
	filesystem.Transaction
	Binary string
	Repo   string
	Node   string
	// contains filtered or unexported fields
}

Transaction represents a CVMFS transaction

func NewTransaction

func NewTransaction(opts *Opts, log logging.Logger, nestedCatalogDirs ...string) *Transaction

NewTransaction will create a transaction object and call its open() method. The transaction Close() method should be deferred immediately after calling this, assuming no error was returned.

func (*Transaction) Attempts

func (t *Transaction) Attempts() int

Attempts provides the number of tries allowed for opening the transaction

func (*Transaction) Kill

func (t *Transaction) Kill(ctx context.Context) error

Kill will halt the ongoing transaction forcefully exiting without publishing

func (*Transaction) Start

func (t *Transaction) Start(ctx context.Context) error

Start will open a new transaction. If one is already ongoing on this node, it will return an error

func (*Transaction) Stop

func (t *Transaction) Stop(ctx context.Context) error

Stop will exit the transaction after publishing

Jump to

Keyboard shortcuts

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