Documentation ¶
Index ¶
- func FetchRepositories(registry *registry.Registry) (map[reference.Named]*Repository, error)
- type Image
- type Index
- func (i *Index) DeleteImage(imageRef reference.NamedTagged)
- func (i *Index) Locker() sync.Locker
- func (i *Index) MarshalJSON() ([]byte, error)
- func (i *Index) ReplaceAllRepositories(repositories map[reference.Named]*Repository)
- func (i *Index) ReplaceImage(imageRef reference.NamedTagged, image *Image)
- func (i *Index) ReplaceRepository(repository *Repository)
- func (i *Index) Repositories() []reference.Named
- func (i *Index) Repository(repositoryRef reference.Named) *Repository
- func (i *Index) UnmarshalJSON(b []byte) error
- type Indexer
- func (i *Indexer) ActionQueue() notifications.ActionQueue
- func (i *Indexer) DeleteImage(imageRef reference.NamedTagged)
- func (i *Indexer) IndexAll() error
- func (i *Indexer) IndexImage(imageRef reference.NamedTagged) error
- func (i *Indexer) IndexRepository(repositoryRef reference.Named) error
- func (i *Indexer) Serve(ctx context.Context, wg *sync.WaitGroup)
- type Repository
- type StateStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchRepositories ¶
FetchRepositories fetch all repositories from a registry
Types ¶
type Image ¶
type Image struct { Tag string `json:"tag"` Created time.Time `json:"created"` Labels map[string]string `json:"labels"` }
func FetchImage ¶
FetchImage fetch a single image from a repository in a registry
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index contains a index of a Docker registry
func (*Index) DeleteImage ¶
func (i *Index) DeleteImage(imageRef reference.NamedTagged)
DeleteImage deletes an image from a repository
func (*Index) MarshalJSON ¶
MarshalJSON handles JSON serialization of an Index
func (*Index) ReplaceAllRepositories ¶
func (i *Index) ReplaceAllRepositories(repositories map[reference.Named]*Repository)
ReplaceAllRepositories atomically replaces all repositories
func (*Index) ReplaceImage ¶
func (i *Index) ReplaceImage(imageRef reference.NamedTagged, image *Image)
ReplaceImage atomically replaces a single image
func (*Index) ReplaceRepository ¶
func (i *Index) ReplaceRepository(repository *Repository)
ReplaceRepository atomically replaces a single repository
func (*Index) Repositories ¶
Repositories returns a list of all the repository names
func (*Index) Repository ¶
func (i *Index) Repository(repositoryRef reference.Named) *Repository
Repository returns a single repository
func (*Index) UnmarshalJSON ¶
UnmarshalJSON handles JSON deserialization of an Index
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
func NewIndexer ¶
func NewIndexer(index *Index, actionQueueLength uint64, registries ...*registry.Registry) (*Indexer, error)
NewIndexer creates a new Indexer
func (*Indexer) ActionQueue ¶
func (i *Indexer) ActionQueue() notifications.ActionQueue
ActionQueue returns an action queue for use by notification listeners
func (*Indexer) DeleteImage ¶
func (i *Indexer) DeleteImage(imageRef reference.NamedTagged)
DeleteImage deletes an image from a repository
func (*Indexer) IndexImage ¶
func (i *Indexer) IndexImage(imageRef reference.NamedTagged) error
IndexImage reindexes a single image
func (*Indexer) IndexRepository ¶
IndexRepository performs a reindexing of a single repository
type Repository ¶
type Repository struct { Name reference.Named Images []*Image // contains filtered or unexported fields }
func FetchRepository ¶
func FetchRepository(registry *registry.Registry, repositoryRef reference.Named) (*Repository, error)
FetchRepository fetch a whole repository from a registry
func RepositoryFromImages ¶
func RepositoryFromImages(repositoryRef reference.Named, images ...*Image) *Repository
RepositoryFromImages creates a new Repository from a single Image
func (*Repository) DeleteImage ¶
func (r *Repository) DeleteImage(imageRef reference.NamedTagged)
DeleteImage deletes an image from the repository
func (*Repository) GetImage ¶
func (r *Repository) GetImage(imageRef reference.NamedTagged) *Image
GetImage gets an image by it's tag name
func (*Repository) UpdateImage ¶
func (r *Repository) UpdateImage(image *Image)
UpdateImage adds or updates an image in the repository
type StateStorage ¶
func NewStateStorage ¶
func NewStateStorage(stateFile string, ctx context.Context) (StateStorage, error)