Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultCtxTimeout = 5 * time.Minute DefaultLimit = 20 )
View Source
const (
DefaultHTTPTimeout = 15 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func GetManifestBodyCheckSum ¶
crc32 hash and err
func Run ¶
func Run(opt *SyncOption)
func Sync ¶
func Sync(opt *SyncOption) error
Types ¶
type CheckSumer ¶
type CheckSumer interface { CreatBucket(string) error Diff(string, uint32) (bool, error) Save(string, uint32) error }
func NewBolt ¶
func NewBolt(db *bolt.DB) CheckSumer
type Images ¶
type Images []*Image
func ImageNames ¶
func ImageNames(opt *SyncOption) (Images, error)
并发获取k8s.gcr.io/$imgName:tag写入chan
func SyncImages ¶
func SyncImages(imgs Images, opt *SyncOption) Images
type SyncOption ¶
type SyncOption struct { Auth auth CmdTimeout time.Duration // command timeout SingleTimeout time.Duration // Sync single image timeout LiveInterval time.Duration LoginRetry uint8 Limit int // Images sync process limit PushRepo string PushNS string QueryLimit int // Query Gcr images limit Retry int RetryInterval time.Duration Report bool // Report sync result Ctx context.Context CheckSumer Closer func() error DbFile string AdditionNS []string }
func (*SyncOption) Verify ¶
func (s *SyncOption) Verify() error
type TagsOption ¶
Click to show internal directories.
Click to hide internal directories.