Documentation ¶
Index ¶
- func NewTracker(svc *tracker.Services, r *hub.Repository, opts ...func(t tracker.Tracker)) tracker.Tracker
- func WithIndexLoader(il hub.HelmIndexLoader) func(t tracker.Tracker)
- func WithNumWorkers(n int) func(t tracker.Tracker)
- func WithOCITagsGetter(tg tracker.OCITagsGetter) func(t tracker.Tracker)
- type Job
- type JobKind
- type OCITagsGetter
- type OCITagsGetterMock
- type Tracker
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTracker ¶
func NewTracker( svc *tracker.Services, r *hub.Repository, opts ...func(t tracker.Tracker), ) tracker.Tracker
NewTracker creates a new Tracker instance.
func WithIndexLoader ¶
func WithIndexLoader(il hub.HelmIndexLoader) func(t tracker.Tracker)
WithIndexLoader allows providing a specific Helm repository index loader for a Tracker instance.
func WithNumWorkers ¶
WithNumWorkers allows providing a specific number of workers for a Tracker instance.
func WithOCITagsGetter ¶ added in v0.10.0
func WithOCITagsGetter(tg tracker.OCITagsGetter) func(t tracker.Tracker)
WithOCITagsGetter allows providing a specific OCI tags getter for a Tracker instance.
Types ¶
type Job ¶
type Job struct { Kind JobKind ChartVersion *helmrepo.ChartVersion StoreLogo bool }
Job represents a job for registering or unregistering a Helm package version available in the provided Helm repository. Jobs are created by the dispatcher and will eventually be handled by a worker.
type JobKind ¶
type JobKind int
JobKind represents the kind of a job, which can be register or unregister.
type OCITagsGetter ¶ added in v0.10.0
type OCITagsGetter struct{}
OCITagsGetter provides a mechanism to get all the tags available for a given repository in a OCI registry.
func (*OCITagsGetter) Tags ¶ added in v0.10.0
func (tg *OCITagsGetter) Tags(ctx context.Context, r *hub.Repository) ([]string, error)
Tags returns a list with the tags available for the provided repository.
type OCITagsGetterMock ¶ added in v0.10.0
OCITagsGetterMock is a mock implementation of the OCITagsGetter interface.
func (*OCITagsGetterMock) Tags ¶ added in v0.10.0
func (m *OCITagsGetterMock) Tags(ctx context.Context, r *hub.Repository) ([]string, error)
Tags implements the OCITagsGetter interface.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker is in charge of tracking the packages available in a Helm repository, registering and unregistering them as needed.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is in charge of handling Helm packages register and unregister jobs generated by the tracker.