worker

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats added in v0.2.2

type Stats struct {
	Errors int

	Kinds     int
	Pages     int
	Resources int
	// contains filtered or unexported fields
}

Stats worker stats

func RunExport

func RunExport(workers []Worker, resources []*types.GroupResource) (*Stats, error)

RunExport run the export wit the given workers

func (*Stats) Add added in v0.2.2

func (s *Stats) Add(o *Stats)

Add stats

func (*Stats) HasErrors added in v0.2.2

func (s *Stats) HasErrors() bool

HasErrors true if errors >0

func (*Stats) Namespaces added in v0.2.2

func (s *Stats) Namespaces() int

Namespaces get the number of namespaces

type Worker

type Worker interface {
	GenerateWork(s *sync.WaitGroup, out chan *types.GroupResource) func(resource *types.GroupResource)
	Stop() Stats
}

Worker interface

func New

func New(id int, config *types.Config, ac *client.ApiClient, prog *mpb.Progress, mainBar *mpb.Bar) Worker

New create a new worker

Jump to

Keyboard shortcuts

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