adapter

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package adapter contains implementations of the OutputAdapter interface of the octopus crawler.

This package contains two types of adapters StdOpAdapter and FileWriterAdapter. The StdOpAdapter prints the depth and url to standard output (usually the screen). The FileWriterAdapter prints the output to a specified File.

Both can be used as an OutputAdapter as part of the octopus crawler's CrawlOptions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWriterAdapter

type FileWriterAdapter struct {
	FilePath string
}

FileWriterAdapter is an output adapter that writes the output to a specified file. Sample Output Format is:

Depth - Url

func (*FileWriterAdapter) Consume

func (fw *FileWriterAdapter) Consume() *oct.NodeChSet

type StdOpAdapter

type StdOpAdapter struct{}

StdOpAdapter is an output adapter that just prints the output onto the screen.

Sample Output Format is:

LinkNum - Depth - Url

func (*StdOpAdapter) Consume

func (s *StdOpAdapter) Consume() *oct.NodeChSet

Jump to

Keyboard shortcuts

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