display

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(ctx context.Context) *slog.Logger

Logger return the logger attached to context or the standard one.

func NewLogger

func NewLogger(
	ctx context.Context,
	debug bool,
) (context.Context, *slog.Logger)

NewLogger returns a logger.

func NewTagStatusHintPrinter

func NewTagStatusHintPrinter(target oras.Target, refPrefix string) oras.Target

NewTagStatusHintPrinter creates a wrapper type for printing tag status and hint.

func NewTagStatusPrinter

func NewTagStatusPrinter(target oras.Target) oras.Target

NewTagStatusPrinter creates a wrapper type for printing tag status.

func Print

func Print(a ...any) error

Print objects to display concurrent-safely

func PrintStatus

func PrintStatus(desc ocispec.Descriptor, status string, verbose bool) error

PrintStatus prints transfer status.

func PrintSuccessorStatus

func PrintSuccessorStatus(
	ctx context.Context,
	desc ocispec.Descriptor,
	status string,
	fetcher content.Fetcher,
	committed *sync.Map,
	verbose bool,
) error

PrintSuccessorStatus prints transfer status of successors.

func ShortDigest

func ShortDigest(desc ocispec.Descriptor) (digestString string)

ShortDigest converts the digest of the descriptor to a short form for displaying.

func StatusPrinter

func StatusPrinter(status string, verbose bool) func(context.Context, ocispec.Descriptor) error

StatusPrinter returns a tracking function for transfer status.

Types

This section is empty.

Jump to

Keyboard shortcuts

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