indexer

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Email    string
	User     string
	Domain   string
	Password string
}

Credential - JSON parsed line

type Indexer

type Indexer struct {
	Offsets []Labor

	NoCleanup bool
	// contains filtered or unexported fields
}

Indexer - The main indexer object

func GetIndexer

func GetIndexer(target, output, key string, maxWorkers uint, tmpDir string, noCleanup bool) (*Indexer, error)

GetIndexer - Get an indexer

func (*Indexer) Count

func (i *Indexer) Count() int

Count the lines processed

func (*Indexer) Start

func (i *Indexer) Start() error

Start the workers

type Labor

type Labor struct {
	Start int64
	Stop  int64
}

Labor - Each worker's part of a file

type Line

type Line struct {
	Raw    string
	Offset int64
}

Line - Raw data of a line in the file and offset

func (*Line) Cred

func (l *Line) Cred() Credential

Cred - Prase the raw line as a Credential

type Worker

type Worker struct {
	ID         int
	Wg         *sync.WaitGroup
	TargetPath string
	OutputPath string
	LineCount  uint64
	Position   int64
	Labor      Labor
}

Worker - Worker thread

Jump to

Keyboard shortcuts

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