Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParallelStrategy ¶
type ParallelStrategy struct {
// contains filtered or unexported fields
}
ParallelStrategy implements a concurrent synchronization strategy
func NewParallelStrategy ¶
func NewParallelStrategy(dockerClient docker.ClientInterface, concurrency int) *ParallelStrategy
NewParallelStrategy creates a new parallel sync strategy
func (*ParallelStrategy) Execute ¶
func (s *ParallelStrategy) Execute(ctx context.Context, operations []*SyncOperation) ([]*SyncResult, error)
Execute performs concurrent image synchronization
func (*ParallelStrategy) Name ¶
func (s *ParallelStrategy) Name() string
Name returns the name of the strategy
type StandardStrategy ¶
type StandardStrategy struct {
// contains filtered or unexported fields
}
StandardStrategy implements a sequential synchronization strategy
func NewStandardStrategy ¶
func NewStandardStrategy(dockerClient docker.ClientInterface) *StandardStrategy
NewStandardStrategy creates a new standard (sequential) sync strategy
func (*StandardStrategy) Execute ¶
func (s *StandardStrategy) Execute(ctx context.Context, operations []*SyncOperation) ([]*SyncResult, error)
Execute performs sequential image synchronization
func (*StandardStrategy) Name ¶
func (s *StandardStrategy) Name() string
Name returns the name of the strategy
type StrategyFactory ¶
type StrategyFactory struct {
// contains filtered or unexported fields
}
StrategyFactory creates synchronization strategies
func NewStrategyFactory ¶
func NewStrategyFactory( dockerClient docker.ClientInterface, concurrency int, validateDst bool, force bool, dryRun bool, ) *StrategyFactory
NewStrategyFactory creates a new strategy factory
func (*StrategyFactory) CreateStrategy ¶
func (f *StrategyFactory) CreateStrategy(strategyName string) SyncStrategy
CreateStrategy creates a specific synchronization strategy
type SyncOperation ¶
type SyncOperation struct {
Source *docker.ImageReference
Target *docker.ImageReference
ValidateDst bool
Force bool
DryRun bool
}
SyncOperation represents a single image synchronization operation
type SyncResult ¶
type SyncResult struct {
Operation *SyncOperation
Success bool
Error error
Duration int64 // Duration in milliseconds
ImageSize int64 // Size in bytes
BytesMoved int64
StartTime int64 // Unix timestamp
EndTime int64 // Unix timestamp
DetailedLogs []string
}
SyncResult represents the result of a synchronization operation
type SyncStrategy ¶
type SyncStrategy interface {
// Execute performs the synchronization using the specific strategy
Execute(ctx context.Context, operations []*SyncOperation) ([]*SyncResult, error)
// Name returns the name of the strategy
Name() string
}
SyncStrategy defines the interface for different synchronization strategies