tracker

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitTracker added in v0.4.0

func NewGitTracker() *gitTracker

func PullImage

func PullImage(ctx context.Context, imageRef string) ([]byte, error)

func PushImage

func PushImage(ctx context.Context, imageRef string, data []byte, invocation string) (err error)

func Track

func Track(ctx context.Context, urls []string, input []byte, prune bool, freshen bool) ([]byte, error)

Track implements the common workflow of loading an existing tracker file and adding records to one of its collections. Each url is expected to reference a valid Tekton bundle. Each bundle may be added to none, 1, or 2 collections depending on the Tekton resource types they include.

func WithClient

func WithClient(ctx context.Context, client Client) context.Context

WithClient returns a copy of given context with the included client.

Types

type Client

type Client interface {
	GetTektonObject(ctx context.Context, bundle, kind, name string) (runtime.Object, error)
	GetImage(ctx context.Context, ref name.Reference) (v1.Image, error)
}

func NewClient

func NewClient(ctx context.Context) Client

NewClient returns the client from the context if set, otherwise a new instance.

type Tracker

type Tracker struct {
	// TaskBundles is deprecated and will be removed in the future. Use TrustedTasks instead.
	TaskBundles  map[string][]bundleRecord `json:"task-bundles,omitempty"`
	TrustedTasks map[string][]taskRecord   `json:"trusted_tasks,omitempty"`
}

func (Tracker) Output

func (t Tracker) Output() ([]byte, error)

Output serializes the Tracker state as YAML

Jump to

Keyboard shortcuts

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