Documentation ¶
Index ¶
- func CheckIfIncludeTag(repository string) bool
- func IsContain(items []string, item string) bool
- func IsDigestNotFound(err error) bool
- func IsTagsNotFound(err error) bool
- func NewLimiter(rate int) ratelimit.Limiter
- func NewListLimiter(rate int) ratelimit.Limiter
- func NewListRateLimitedTransport(rate int, transport http.RoundTripper) http.RoundTripper
- func NewRateLimitedTransport(rate int, transport http.RoundTripper) http.RoundTripper
- type RepoURL
- func (r *RepoURL) GetNamespace() string
- func (r *RepoURL) GetOriginURL() string
- func (r *RepoURL) GetRegistry() string
- func (r *RepoURL) GetRepo() string
- func (r *RepoURL) GetRepoWithNamespace() string
- func (r *RepoURL) GetRepoWithTag() string
- func (r *RepoURL) GetTag() string
- func (r *RepoURL) GetURL() string
- func (r *RepoURL) GetURLWithoutTag() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfIncludeTag ¶
CheckIfIncludeTag checks if a repository string includes tag
func IsDigestNotFound ¶ added in v1.2.1
IsDigestNotFound judge is the digest exist
func IsTagsNotFound ¶ added in v1.2.0
IsTagsNotFound judge is the error get tags from repo http not found
func NewListLimiter ¶
NewListLimiter generates a new limiter.
func NewListRateLimitedTransport ¶
func NewListRateLimitedTransport(rate int, transport http.RoundTripper) http.RoundTripper
NewListRateLimitedTransport generates a new transport with rateLimit.
func NewRateLimitedTransport ¶
func NewRateLimitedTransport(rate int, transport http.RoundTripper) http.RoundTripper
NewRateLimitedTransport generates a new transport with rateLimit.
Types ¶
type RepoURL ¶
type RepoURL struct {
// contains filtered or unexported fields
}
The RepoURL will divide a images url to <registry>/<namespace>/<repo>:<tag>
func (*RepoURL) GetNamespace ¶
GetNamespace returns the namespace in a url
func (*RepoURL) GetOriginURL ¶
GetOriginURL returns the whole url
func (*RepoURL) GetRegistry ¶
GetRegistry returns the registry in a url
func (*RepoURL) GetRepoWithNamespace ¶
GetRepoWithNamespace returns namespace/repository in a url
func (*RepoURL) GetRepoWithTag ¶
GetRepoWithTag returns repository:tag in a url
func (*RepoURL) GetURLWithoutTag ¶
GetURLWithoutTag returns registry/namespace/repository in a url