Documentation
¶
Index ¶
- type Architecture
- type MPSCQueue
- func (q *MPSCQueue) Consume(msgHandler func(msg ...Package), errHandler func(err error))
- func (q *MPSCQueue) ConsumerDoneCh() chan bool
- func (q *MPSCQueue) ErrorCh() chan error
- func (q *MPSCQueue) MessageCh() chan []Package
- func (q *MPSCQueue) ProducersWG() *sync.WaitGroup
- func (q *MPSCQueue) SendError(err error)
- func (q *MPSCQueue) SendMessage(msg ...Package)
- func (q *MPSCQueue) SendMessageAndComplete(msg ...Package)
- func (q *MPSCQueue) SigConsumerCompletion()
- func (q *MPSCQueue) SigProducerCompletion()
- func (q *MPSCQueue) WaitAndClose()
- type Mirror
- type Package
- type Repository
- type SearchOptions
- func (o *SearchOptions) Architectures() []Architecture
- func (o *SearchOptions) Log() *output.Logger
- func (o *SearchOptions) PackageFileNames() []string
- func (o *SearchOptions) PackageName() string
- func (o *SearchOptions) ProgressMessage() string
- func (o *SearchOptions) SeedURLs() []string
- func (o *SearchOptions) Verbosity() output.Verbosity
- type URITemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Architecture ¶ added in v0.3.0
type Architecture string
type MPSCQueue ¶ added in v0.3.0
type MPSCQueue struct {
// contains filtered or unexported fields
}
MPSCQueue provides an option set to manage a sync group of multiple producer workers and single consumer, leveraging Go sync.WaitGroup and channels to notify errors, results and completion of consuming the results from the single consumer worker.
func NewMPSCQueue ¶ added in v0.3.0
func (*MPSCQueue) Consume ¶ added in v0.3.0
Consume listens for both messages and errors on queues and do something with them, as specified by msgHandler and errHandler functions.
func (*MPSCQueue) ConsumerDoneCh ¶ added in v0.3.0
func (*MPSCQueue) ProducersWG ¶ added in v0.3.0
func (*MPSCQueue) SendError ¶ added in v0.3.0
SendError sends an error message of type error to the errors queue.
func (*MPSCQueue) SendMessage ¶ added in v0.3.0
SendMessage sends a message as variadic parameter msg of type packages.Package to the messages queue.
func (*MPSCQueue) SendMessageAndComplete ¶ added in v0.3.0
SendMessageAndComplete sends a message as variadic parameter msg of type archive.Package to the messages queue, and eventually signals the completion of the current producer.
func (*MPSCQueue) SigConsumerCompletion ¶ added in v0.3.0
func (q *MPSCQueue) SigConsumerCompletion()
SigConsumerCompletion signals that the consumer completed its work.
func (*MPSCQueue) SigProducerCompletion ¶ added in v0.3.0
func (q *MPSCQueue) SigProducerCompletion()
SigProducerCompletion signals that a producer completed its work.
func (*MPSCQueue) WaitAndClose ¶ added in v0.3.0
func (q *MPSCQueue) WaitAndClose()
type Mirror ¶
type Mirror struct { Name string // The base URL of the package mirror // (e.g. https://mirrors.kernel.org/<distribution>) URL string }
type Repository ¶
type Repository struct { Name string URI URITemplate }
type SearchOptions ¶ added in v0.3.0
type SearchOptions struct { *output.ProgressOptions *MPSCQueue // contains filtered or unexported fields }
func NewSearchOptions ¶ added in v0.3.0
func NewSearchOptions(packageName string, architectures []Architecture, seedURLs []string, verbosity output.Verbosity, progressMessage string, packageFileNames ...string) *SearchOptions
func (*SearchOptions) Architectures ¶ added in v0.3.0
func (o *SearchOptions) Architectures() []Architecture
func (*SearchOptions) Log ¶ added in v0.3.0
func (o *SearchOptions) Log() *output.Logger
func (*SearchOptions) PackageFileNames ¶ added in v0.3.0
func (o *SearchOptions) PackageFileNames() []string
func (*SearchOptions) PackageName ¶ added in v0.3.0
func (o *SearchOptions) PackageName() string
func (*SearchOptions) ProgressMessage ¶ added in v0.3.0
func (o *SearchOptions) ProgressMessage() string
func (*SearchOptions) SeedURLs ¶ added in v0.3.0
func (o *SearchOptions) SeedURLs() []string
func (*SearchOptions) Verbosity ¶ added in v0.3.0
func (o *SearchOptions) Verbosity() output.Verbosity
type URITemplate ¶
type URITemplate string