Documentation ¶
Index ¶
- Constants
- Variables
- func GetThreads() int
- func NewLocallyGenerated(context context.Context, serviceManager artifactory.ArtifactoryServicesManager, ...) *locallyGeneratedFilter
- func NewSrcUserPluginService(artDetails auth.ServiceDetails, client *jfroghttpclient.JfrogHttpClient) *srcUserPluginService
- func ShouldStop(phase *phaseBase, delayHelper *delayUploadHelper, ...) bool
- func ShowStatus() error
- type AqlPropertySearchResult
- type ChunksLifeCycleManager
- type DelayedArtifactsChannelMng
- type DelayedArtifactsFile
- type ErrorsChannelMng
- type ExtendedFileUploadStatusResponse
- type FileWithLongProperty
- type FilesErrors
- type InterruptionErr
- type LocallyGeneratedPayload
- type LongPropertyCheck
- type PollingTasksManager
- type Property
- type SplitContentWriter
- type TransferDelayedArtifactsMng
- type TransferErrorsMng
- type TransferFilesCommand
- func (tdc *TransferFilesCommand) CommandName() string
- func (tdc *TransferFilesCommand) NewTransferDataPreChecksRunner() (runner *precheckrunner.PreCheckRunner, err error)
- func (tdc *TransferFilesCommand) Run() (err error)
- func (tdc *TransferFilesCommand) SetExcludeReposPatterns(excludeReposPatterns []string)
- func (tdc *TransferFilesCommand) SetFilestore(filestore bool)
- func (tdc *TransferFilesCommand) SetIgnoreState(ignoreState bool)
- func (tdc *TransferFilesCommand) SetIncludeReposPatterns(includeReposPatterns []string)
- func (tdc *TransferFilesCommand) SetPreChecks(check bool)
- func (tdc *TransferFilesCommand) SetProxyKey(proxyKey string)
- func (tdc *TransferFilesCommand) SetStatus(status bool)
- func (tdc *TransferFilesCommand) SetStop(stop bool)
- type TransferProgressMng
- func (t *TransferProgressMng) AddPhase1(skip bool)
- func (t *TransferProgressMng) AddPhase2()
- func (t *TransferProgressMng) AddPhase3()
- func (t *TransferProgressMng) DonePhase(id int) error
- func (t *TransferProgressMng) IncrementPhase(id int) error
- func (t *TransferProgressMng) IncrementPhaseBy(id int, n int) error
- func (t *TransferProgressMng) NewRepository(name string)
- func (t *TransferProgressMng) Quit() error
- func (t *TransferProgressMng) RemoveRepository()
- func (t *TransferProgressMng) ShouldDisplay() bool
- func (t *TransferProgressMng) StopGracefully()
- type UploadedChunk
- type UploadedChunkData
- type VerifyCompatibilityResponse
Constants ¶
const ( DefaultAqlPaginationLimit = 10000 SyncErrorReason = "un-synchronized chunk status due to network issue" SyncErrorStatusCode = 404 StopFileName = "stop" )
const NumberOfPhases = 3
Variables ¶
var AqlPaginationLimit = DefaultAqlPaginationLimit
Functions ¶
func GetThreads ¶ added in v2.19.0
func GetThreads() int
func NewLocallyGenerated ¶ added in v2.32.0
func NewLocallyGenerated(context context.Context, serviceManager artifactory.ArtifactoryServicesManager, artifactoryVersion string) *locallyGeneratedFilter
func NewSrcUserPluginService ¶
func NewSrcUserPluginService(artDetails auth.ServiceDetails, client *jfroghttpclient.JfrogHttpClient) *srcUserPluginService
func ShouldStop ¶ added in v2.19.0
func ShouldStop(phase *phaseBase, delayHelper *delayUploadHelper, errorsChannelMng *ErrorsChannelMng) bool
ShouldStop Stop transferring if one of the following happened: * Error occurred while handling errors (for example - not enough space in file system) * Error occurred during delayed artifacts handling * User interrupted the process (ctrl+c)
func ShowStatus ¶ added in v2.23.0
func ShowStatus() error
Types ¶
type AqlPropertySearchResult ¶ added in v2.25.0
type AqlPropertySearchResult struct {
Results []Property
}
AqlPropertySearchResult - the structure that returns from a property aql search
type ChunksLifeCycleManager ¶ added in v2.21.1
type ChunksLifeCycleManager struct {
// contains filtered or unexported fields
}
func (*ChunksLifeCycleManager) GetInProgressTokensSlice ¶ added in v2.21.1
func (clcm *ChunksLifeCycleManager) GetInProgressTokensSlice() []api.ChunkId
func (*ChunksLifeCycleManager) GetInProgressTokensSliceByNodeId ¶ added in v2.21.1
func (clcm *ChunksLifeCycleManager) GetInProgressTokensSliceByNodeId(nodeId nodeId) []api.ChunkId
func (*ChunksLifeCycleManager) StoreStaleChunks ¶ added in v2.36.1
func (clcm *ChunksLifeCycleManager) StoreStaleChunks(stateManager *state.TransferStateManager) error
Save in the TransferRunStatus the chunks that have been in transit for more than 30 minutes. This allows them to be displayed using the '--status' option. stateManager - Transfer state manager
type DelayedArtifactsChannelMng ¶ added in v2.18.2
type DelayedArtifactsChannelMng struct {
// contains filtered or unexported fields
}
DelayedArtifactsChannelMng is used when writing 'delayed artifacts' to a common channel. If an error occurs while handling the files - this message is used to stop adding elements to the channel.
type DelayedArtifactsFile ¶
type DelayedArtifactsFile struct {
DelayedArtifacts []api.FileRepresentation `json:"delayed_artifacts,omitempty"`
}
type ErrorsChannelMng ¶ added in v2.18.2
type ErrorsChannelMng struct {
// contains filtered or unexported fields
}
ErrorsChannelMng handles the uploading errors and adds them to a common channel. Stops adding elements to the channel if an error occurs while handling the files.
type ExtendedFileUploadStatusResponse ¶ added in v2.18.7
type ExtendedFileUploadStatusResponse struct { api.FileUploadStatusResponse Time string `json:"time,omitempty"` }
type FileWithLongProperty ¶ added in v2.25.0
type FileWithLongProperty struct { // The file that contains the long property api.FileRepresentation // The length of the property's value Length uint `json:"value-length,omitempty"` // The property that failed the check Property }
FileWithLongProperty - Represent a failed instance; File with property that has failed the check (used for csv report format)
type FilesErrors ¶
type FilesErrors struct {
Errors []ExtendedFileUploadStatusResponse `json:"errors,omitempty"`
}
type InterruptionErr ¶ added in v2.19.0
type InterruptionErr struct{}
func (*InterruptionErr) Error ¶ added in v2.19.0
func (m *InterruptionErr) Error() string
type LocallyGeneratedPayload ¶ added in v2.32.0
type LocallyGeneratedPayload struct { RepoKey string `json:"repoKey,omitempty"` Paths []string `json:"paths,omitempty"` }
The request and response payload of POST '/api/localgenerated/filter/paths'
type LongPropertyCheck ¶ added in v2.25.0
type LongPropertyCheck struct {
// contains filtered or unexported fields
}
func NewLongPropertyCheck ¶ added in v2.25.0
func NewLongPropertyCheck(repos []string) *LongPropertyCheck
func (*LongPropertyCheck) ExecuteCheck ¶ added in v2.25.0
func (lpc *LongPropertyCheck) ExecuteCheck(args precheckrunner.RunArguments) (passed bool, err error)
func (*LongPropertyCheck) Name ¶ added in v2.25.0
func (lpc *LongPropertyCheck) Name() string
type PollingTasksManager ¶ added in v2.18.2
type PollingTasksManager struct {
// contains filtered or unexported fields
}
type SplitContentWriter ¶ added in v2.23.2
type SplitContentWriter struct {
// contains filtered or unexported fields
}
SplitContentWriter writes to files a single JSON object that holds a list of records added as stream. It can limit the amount of records per file and splits the content to several files if needed.
type TransferDelayedArtifactsMng ¶
type TransferDelayedArtifactsMng struct {
// contains filtered or unexported fields
}
TransferDelayedArtifactsMng takes care of the multi-threaded-writing of artifacts to be transferred, while maintaining the correct order of the deployment. This is needed because, for example, for maven repositories, pom file should be deployed last.
type TransferErrorsMng ¶
type TransferErrorsMng struct {
// contains filtered or unexported fields
}
TransferErrorsMng manages multi threads writing errors. We want to create a file which contains all upload error statuses for each repository and phase. Those files will serve us in 2 cases: 1. Whenever we re-run 'transfer-files' command, we want to attempt to upload failed files again. 2. As part of the transfer process, we generate a csv file that contains all upload errors. In case an error occurs when creating those upload errors files, we would like to stop the transfer right away.
type TransferFilesCommand ¶
type TransferFilesCommand struct {
// contains filtered or unexported fields
}
func NewTransferFilesCommand ¶
func NewTransferFilesCommand(sourceServer, targetServer *config.ServerDetails) (*TransferFilesCommand, error)
func (*TransferFilesCommand) CommandName ¶
func (tdc *TransferFilesCommand) CommandName() string
func (*TransferFilesCommand) NewTransferDataPreChecksRunner ¶ added in v2.25.0
func (tdc *TransferFilesCommand) NewTransferDataPreChecksRunner() (runner *precheckrunner.PreCheckRunner, err error)
Creates the Pre-checks runner for the data transfer command
func (*TransferFilesCommand) Run ¶
func (tdc *TransferFilesCommand) Run() (err error)
func (*TransferFilesCommand) SetExcludeReposPatterns ¶
func (tdc *TransferFilesCommand) SetExcludeReposPatterns(excludeReposPatterns []string)
func (*TransferFilesCommand) SetFilestore ¶
func (tdc *TransferFilesCommand) SetFilestore(filestore bool)
func (*TransferFilesCommand) SetIgnoreState ¶ added in v2.20.3
func (tdc *TransferFilesCommand) SetIgnoreState(ignoreState bool)
func (*TransferFilesCommand) SetIncludeReposPatterns ¶
func (tdc *TransferFilesCommand) SetIncludeReposPatterns(includeReposPatterns []string)
func (*TransferFilesCommand) SetPreChecks ¶ added in v2.25.0
func (tdc *TransferFilesCommand) SetPreChecks(check bool)
func (*TransferFilesCommand) SetProxyKey ¶ added in v2.21.0
func (tdc *TransferFilesCommand) SetProxyKey(proxyKey string)
func (*TransferFilesCommand) SetStatus ¶ added in v2.23.0
func (tdc *TransferFilesCommand) SetStatus(status bool)
func (*TransferFilesCommand) SetStop ¶ added in v2.28.0
func (tdc *TransferFilesCommand) SetStop(stop bool)
type TransferProgressMng ¶ added in v2.20.0
type TransferProgressMng struct {
// contains filtered or unexported fields
}
TransferProgressMng provides progress indication for the jf rt transfer-files command. Transferring one repository's data at a time.
func (*TransferProgressMng) AddPhase1 ¶ added in v2.20.0
func (t *TransferProgressMng) AddPhase1(skip bool)
func (*TransferProgressMng) AddPhase2 ¶ added in v2.20.0
func (t *TransferProgressMng) AddPhase2()
func (*TransferProgressMng) AddPhase3 ¶ added in v2.21.0
func (t *TransferProgressMng) AddPhase3()
func (*TransferProgressMng) DonePhase ¶ added in v2.20.0
func (t *TransferProgressMng) DonePhase(id int) error
func (*TransferProgressMng) IncrementPhase ¶ added in v2.20.0
func (t *TransferProgressMng) IncrementPhase(id int) error
IncrementPhase increments completed tasks count for a specific phase by 1.
func (*TransferProgressMng) IncrementPhaseBy ¶ added in v2.20.0
func (t *TransferProgressMng) IncrementPhaseBy(id int, n int) error
IncrementPhaseBy increments completed tasks count for a specific phase by n.
func (*TransferProgressMng) NewRepository ¶ added in v2.20.0
func (t *TransferProgressMng) NewRepository(name string)
NewRepository adds new repository's progress details. Aborting previous repository if exists.
func (*TransferProgressMng) Quit ¶ added in v2.20.0
func (t *TransferProgressMng) Quit() error
Quit terminate the TransferProgressMng process.
func (*TransferProgressMng) RemoveRepository ¶ added in v2.20.0
func (t *TransferProgressMng) RemoveRepository()
func (*TransferProgressMng) ShouldDisplay ¶ added in v2.20.0
func (t *TransferProgressMng) ShouldDisplay() bool
func (*TransferProgressMng) StopGracefully ¶ added in v2.20.0
func (t *TransferProgressMng) StopGracefully()
type UploadedChunk ¶ added in v2.24.0
type UploadedChunk struct { api.UploadChunkResponse UploadedChunkData }
type UploadedChunkData ¶ added in v2.21.1
type UploadedChunkData struct { ChunkFiles []api.FileRepresentation TimeSent time.Time }