Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputItem ¶
type OutputItem struct {
Source string `json:"source"`
Target string `json:"target"`
Repository string `json:"repository"`
StartTime time.Time
EndTime time.Time
Duration time.Duration
Status string `json:"status"` // Success, Failed, or Skipped
ErrorMsg string `json:"error,omitempty"`
}
OutputItem represents an item in the output
type SyncStatistics ¶
type SyncStatistics struct {
TotalImages int `json:"total_images"`
Successful int `json:"successful"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
TotalDuration time.Duration `json:"total_duration"`
AverageDuration time.Duration `json:"average_duration"`
}
SyncStatistics holds statistics about the sync operation
type SyncStatisticsV2 ¶ added in v0.2.0
type SyncStatisticsV2 struct {
TotalImages int // Total number of images to sync
Successful int // Number of successfully synced images
Failed int // Number of failed sync operations
Skipped int // Number of skipped images
TotalDuration time.Duration // Total duration of the sync process
AverageDuration time.Duration // Average duration per successful operation
}
SyncStatisticsV2 holds statistics for the synchronization process
type Syncer ¶
type Syncer struct {
Config *config.Config
Client docker.ClientInterface
Output []OutputItem
// contains filtered or unexported fields
}
Syncer handles the synchronization of images
func NewSyncer ¶
func NewSyncer(config *config.Config, client docker.ClientInterface) *Syncer
NewSyncer creates a new Syncer instance
func (*Syncer) GetProcessedImageCount ¶
GetProcessedImageCount returns the number of successfully processed images
func (*Syncer) ProcessImage ¶
processImage handles the core image processing logic
func (*Syncer) ProcessImageWithRetry ¶
ProcessImageWithRetry processes a single image with retry logic
type SyncerV2 ¶ added in v0.2.0
type SyncerV2 struct {
// contains filtered or unexported fields
}
SyncerV2 represents the enhanced syncer with dependency injection
func NewSyncerV2 ¶ added in v0.2.0
func NewSyncerV2( config *config.Config, dockerClient docker.ClientInterface, registryClient registry.RegistryInterface, ) *SyncerV2
NewSyncerV2 creates a new SyncerV2 instance with dependency injection
func (*SyncerV2) GetProcessedImageCount ¶ added in v0.2.0
GetProcessedImageCount returns the number of successfully processed images