search

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Search struct {
	// contains filtered or unexported fields
}

Search is the implementation for the searching and caching of image URLs.

func New

func New(log *logrus.Entry, cacheTimeout time.Duration, versionGetter *version.Version) *Search

New creates a new Search for querying searches over image tags.

func (*Search) Fetch

func (s *Search) Fetch(ctx context.Context, imageURL string, opts *api.Options) (interface{}, error)

func (*Search) LatestImage

func (s *Search) LatestImage(ctx context.Context, imageURL string, opts *api.Options) (*api.ImageTag, error)

LatestImage will get the latestImage image given an image URL and options. If not found in the cache, or is too old, then will do a fresh lookup and commit to the cache.

func (*Search) ResolveSHAToTag added in v0.9.1

func (s *Search) ResolveSHAToTag(ctx context.Context, imageURL string, imageSHA string) (string, error)

type Searcher

type Searcher interface {
	LatestImage(context.Context, string, *api.Options) (*api.ImageTag, error)
	ResolveSHAToTag(ctx context.Context, imageURL string, imageSHA string) (string, error)
}

Searcher is the interface for Search to facilitate testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL