{"modulePath":"github.com/maximilien/weave-cli","version":"v0.15.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package progress\n\n## Types\n\n```go\ntype ProgressMessage struct {\n\tType       string  `json:\"type\"`\n\tPhase      string  `json:\"phase\"`\n\tMessage    string  `json:\"message\"`\n\tElapsed    float64 `json:\"elapsed\"`\n\tProgress   float64 `json:\"progress,omitempty\"`   // 0-100 percentage\n\tCurrent    int     `json:\"current,omitempty\"`    // Current item count\n\tTotal      int     `json:\"total,omitempty\"`      // Total item count\n\tETA        float64 `json:\"eta,omitempty\"`        // Estimated seconds remaining\n\tThroughput float64 `json:\"throughput,omitempty\"` // Items per second\n}\n```\nProgressMessage represents a progress update in JSON format\n\n```go\ntype Reporter struct {\n\t// contains filtered or unexported fields\n}\n```\nReporter provides progress reporting functionality for long-running operations\n\n```go\nfunc NewJSONReporter(enabled bool) *Reporter\n```\nNewJSONReporter creates a new progress reporter with JSON output\n\n```go\nfunc NewReporter(enabled bool) *Reporter\n```\nNewReporter creates a new progress reporter\n\n```go\nfunc (p *Reporter) Complete(msg string)\n```\nComplete marks the operation as complete with a final message\n\n```go\nfunc (p *Reporter) SetTotal(total int)\n```\nSetTotal sets the total number of items to process (for percentage/ETA calculation)\n\n```go\nfunc (p *Reporter) Start(msg string)\n```\nStart begins a progress reporting session with an initial message\n\n```go\nfunc (p *Reporter) Update(msg string)\n```\nUpdate reports progress with a message and elapsed time\n\n```go\nfunc (p *Reporter) UpdateProgress(msg string)\n```\nUpdateProgress reports progress with a specific count (increments current)\n\n```go\nfunc (p *Reporter) UpdateWithCount(current int, msg string)\n```\nUpdateWithCount reports progress with an explicit current count\n\n","path":"github.com/maximilien/weave-cli/src/pkg/progress","name":"progress","synopsis":"","isRedistributable":true}
