ui

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0, MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProgressBar added in v0.4.0

func NewProgressBar() progress.Model

func RunUploadUI

func RunUploadUI(
	ctx context.Context,
	repo *sqlrepo.Repo,
	api preparation.API,
	uploads []*uploadsmodel.Upload,
	retry bool,
	eb bus.Subscriber,
) error

Types

type Canceled

type Canceled struct{}

func (Canceled) Error

func (c Canceled) Error() string

type FSEntry added in v0.4.0

type FSEntry struct {
	Path  string
	IsDir bool
	Size  uint64
}

type Observation added in v0.4.0

type Observation struct {
	Model     *uploadsmodel.Upload
	SourceDir string

	OpenShards     []events.ShardView
	ClosedShards   []events.ShardView
	UploadedShards []events.ShardView
	AddedShards    []events.ShardView
	BytesRead      uint64
	FilesFound     uint64
	TotalDags      uint64
	ProcessedDags  uint64
	// ID is a blob ID
	ClientUploadProgress map[id.ID]PutProgress
	WorkerStates         map[string]events.UploadWorkerEvent
}

type PutProgress added in v0.4.0

type PutProgress struct {
	Uploaded uint64
	Total    uint64
}

type UploadObserver added in v0.4.0

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

func NewUploadObserver added in v0.4.0

func NewUploadObserver(sub bus.Subscriber, repo *sqlrepo.Repo, uploads ...*uploadsmodel.Upload) *UploadObserver

func (*UploadObserver) Observe added in v0.4.0

func (o *UploadObserver) Observe(ctx context.Context) []Observation

func (*UploadObserver) Subscribe added in v0.4.0

func (o *UploadObserver) Subscribe() error

type UploadState added in v0.4.0

type UploadState struct {
	Model     *uploadsmodel.Upload
	SourceDir string

	PutProgress map[id.ID]PutProgress

	Shards map[id.ShardID]events.ShardView

	DagsFsMap   map[id.FSEntryID]cid.Cid
	DagsTotal   uint64
	DagsScanned uint64

	FsEntries     map[id.FSEntryID]FSEntry
	FsEntriesSize uint64

	WorkerStates map[string]events.UploadWorkerEvent
}

Jump to

Keyboard shortcuts

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