repository

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	QueueEvent(event *eventv1.EventPayload, store bool) error
	Started() bool
	Start(context.Context)
	Stop()
}

type HandlerParams

type HandlerParams struct {
	Dir           string
	Bucket        *blob.Bucket
	RemoteOptions []remote.Option
	NameOptions   []name.Option
	// contains filtered or unexported fields
}

func (HandlerParams) Remove

func (hp HandlerParams) Remove(repository string)

type Manager

type Manager[H Handler] struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager[H Handler](
	params *HandlerParams,
	newHandler func(*slog.Logger, *RepoHandler) H,
) *Manager[H]

func (*Manager[H]) Get

func (m *Manager[H]) Get(ctx context.Context, repository string) H

func (*Manager[H]) GetAll

func (m *Manager[H]) GetAll() map[string]H

func (*Manager[H]) Has

func (m *Manager[H]) Has(repository string) bool

type RepoHandler

type RepoHandler struct {
	Repository string
	Params     *HandlerParams

	Queued chan struct{}

	Stopped atomic.Bool
	// contains filtered or unexported fields
}

func NewRepoHandler

func NewRepoHandler(repository string, params *HandlerParams, cancel context.CancelFunc) *RepoHandler

func (*RepoHandler) DeleteManifest added in v0.0.9

func (rh *RepoHandler) DeleteManifest(ref string) (errFn error)

func (*RepoHandler) DequeueEvents

func (rh *RepoHandler) DequeueEvents() []*eventv1.EventPayload

func (*RepoHandler) DownloadBlob

func (rh *RepoHandler) DownloadBlob(ref string, destinationPath string) (errFn error)

func (*RepoHandler) EnqueueEvent

func (rh *RepoHandler) EnqueueEvent(event *eventv1.EventPayload)

func (*RepoHandler) EventQueueLength

func (rh *RepoHandler) EventQueueLength() int

func (*RepoHandler) EventQueueUpdate

func (rh *RepoHandler) EventQueueUpdate()

func (*RepoHandler) GetManifestDigest added in v0.0.9

func (rh *RepoHandler) GetManifestDigest(ref string) (string, error)

func (*RepoHandler) Started

func (rh *RepoHandler) Started() bool

func (*RepoHandler) Stop

func (rh *RepoHandler) Stop()

func (*RepoHandler) SyncArtifact added in v0.0.18

func (rh *RepoHandler) SyncArtifact(ctx context.Context, name string, timeout time.Duration) (chan error, func() error)

func (*RepoHandler) SyncArtifactReset added in v0.0.18

func (rh *RepoHandler) SyncArtifactReset()

func (*RepoHandler) SyncArtifactResult added in v0.0.18

func (rh *RepoHandler) SyncArtifactResult(name string, err error)

Jump to

Keyboard shortcuts

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