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
Click to show internal directories.
Click to hide internal directories.