services

package
v0.0.0-...-90f9a36 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2016 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

type Crawler struct {
	LinkList *datatypes.SitemapList
	// contains filtered or unexported fields
}

Crawler represents a recursive url fetcher

func NewCrawler

func NewCrawler(urlFetcher UrlFetcher, depth int, logger *log.Logger) *Crawler

NewCrawler creates a new Crawler instance

func (*Crawler) GenerateSitemap

func (c *Crawler) GenerateSitemap(urlToFetch *url.URL, timeout time.Duration) datatypes.Sitemap

GenerateSitemap fetch a url and generate a sitemap datastructure

type UrlFetcher

type UrlFetcher interface {
	ParseUrl(newUrl string) ([]string, []string, error)
}

UrlFetcher is an interface for URL Fetching

Jump to

Keyboard shortcuts

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