app

package
v0.0.0-...-5517070 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version contains the current version.
	Version = "dev"
	// BuildDate contains a string with the build date.
	BuildDate = "unknown"
)

Functions

func SaveInElasticsearch

func SaveInElasticsearch(ctx context.Context, client *elastic.Client, filename string, typeName string, indexName string, batchSize int) error

Types

type BatchIterator

type BatchIterator struct {
	// contains filtered or unexported fields
}

BatchIterator provides a convenient interface for reading lines in batches

func NewBatchIterator

func NewBatchIterator(batchSize int, s *bufio.Scanner) BatchIterator

NewBatchIterator returns a new batch iterator reading from s.

func (*BatchIterator) Err

func (it *BatchIterator) Err() error

Err returns error

func (*BatchIterator) Next

func (it *BatchIterator) Next() bool

Next advances to next batch

func (*BatchIterator) Value

func (it *BatchIterator) Value() []string

Value returns current batch

Jump to

Keyboard shortcuts

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