Help us shape the future of Go! Take the 2026 Go Developer Survey

status

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatePullRunning   = "PULLING"
	StatePullSucceeded = "PULL_SUCCEEDED"
	StatePullFailed    = "PULL_FAILED"
	StatePullTimeout   = "PULL_TIMEOUT"
	StatePullCanceled  = "PULL_CANCELED"
	StateMounted       = "MOUNTED"
	StateUmounted      = "UMOUNTED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook added in v0.1.1

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

func NewHook added in v0.1.1

func NewHook(ctx context.Context) *Hook

func (*Hook) AfterPullLayer added in v0.1.1

func (h *Hook) AfterPullLayer(desc ocispec.Descriptor, err error)

func (*Hook) BeforePullLayer added in v0.1.1

func (h *Hook) BeforePullLayer(desc ocispec.Descriptor, manifest ocispec.Manifest)

func (*Hook) GetProgress added in v0.1.1

func (h *Hook) GetProgress() Progress

type HookManager added in v0.1.1

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

func NewHookManager added in v0.1.1

func NewHookManager() *HookManager

func (*HookManager) Delete added in v0.1.1

func (hm *HookManager) Delete(key string)

func (*HookManager) GetProgress added in v0.1.1

func (hm *HookManager) GetProgress(key string) Progress

func (*HookManager) Set added in v0.1.1

func (hm *HookManager) Set(key string, hook *Hook)

type Progress

type Progress struct {
	Total int            `json:"total"`
	Items []ProgressItem `json:"items"`
}

func (*Progress) String

func (p *Progress) String() (string, error)

type ProgressItem

type ProgressItem struct {
	Digest    digest.Digest `json:"digest"`
	Path      string        `json:"path"`
	Size      int64         `json:"size"`
	StartedAt time.Time     `json:"started_at"`

	FinishedAt *time.Time `json:"finished_at,omitempty"`
	Error      error      `json:"error,omitempty"`

	Span trace.Span `json:"-"`
}

type State

type State = string

type Status

type Status struct {
	VolumeName string   `json:"volume_name,omitempty"`
	MountID    string   `json:"mount_id,omitempty"`
	Reference  string   `json:"reference,omitempty"`
	State      State    `json:"state,omitempty"`
	Inline     bool     `json:"inline,omitempty"`
	Progress   Progress `json:"progress,omitempty"`
}

type StatusManager

type StatusManager struct {
	HookManager *HookManager
	// contains filtered or unexported fields
}

func NewStatusManager

func NewStatusManager() (*StatusManager, error)

func (*StatusManager) Get

func (sm *StatusManager) Get(statusPath string) (*Status, error)

func (*StatusManager) Set

func (sm *StatusManager) Set(statusPath string, newStatus Status) (*Status, error)

Jump to

Keyboard shortcuts

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