Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Assembling and running the pipeline

Congratulations for making it this far! We have finally implemented all individual components that are required for constructing a pipeline for our crawler service. All that's left is to add a little bit of glue code to assemble the individual crawler stages into a pipeline and provide a simple API for running a full crawler pass. All this glue logic is encapsulated inside the Crawler type whose definition and constructor details are listed as follows:

type Crawler struct {
    p *pipeline.Pipeline
}

// NewCrawler returns a new crawler instance.
func NewCrawler(cfg Config) *Crawler {
    return &Crawler{
        p: assembleCrawlerPipeline(cfg),
    }
}

The Config type holds all required configuration options for creating ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content