Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultInterval is the minimum interval to delay before // requesting another oci fetch DefaultInterval time.Duration = time.Hour )
Variables ¶
View Source
var (
DefaultBackoff = time.Second * 30
)
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct { URL string Interval time.Duration Path string // registry, repository, and reference of the artifact Registry string Repository string // tag or digest of the artifact // see https://pkg.go.dev/oras.land/oras-go/v2@v2.5.0/registry#ParseReference // for the format of the reference Reference string // credentials Credential auth.Credential // contains filtered or unexported fields }
func (*Artifact) Pull ¶
Pulls the artifact from the remote repository.
A background context is created with a default timeout of 30 seconds. The artifact is pulled with this context with a max retry count of 10.
During the pull the artifact is copied from the remote repository to a temporary memory store and then to a file store.
The artifact is pulled only if the user defined interval has passed since the last pull.
Users should be careful to respect the rate limits of the remote repository.
Click to show internal directories.
Click to hide internal directories.