options

package
v4.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DisableUnProcessed = disableUnProcessed{} //nolint:gochecknoglobals

DisableUnProcessed sets flag to disable catching lines that have no parser and to return error

View Source
var UseMd5Hash = useMd5Hash{} //nolint:gochecknoglobals

UseMd5Hash sets flag to use md5 hash

View Source
var UseV2HTTPCheck = useV2HTTPCheck{} //nolint:gochecknoglobals

UseV2HTTPCheck sets flag to use deprecated HTTPCheck

Functions

This section is empty.

Types

type Parser

type Parser struct {
	Path               string
	Reader             io.Reader
	Logger             logger.Format // we always will have p.Options.LogPrefix
	UseV2HTTPCheck     bool
	UseMd5Hash         bool
	DisableUnProcessed bool
	Log                bool
	LogPrefix          string
}

type ParserOption

type ParserOption interface {
	Set(p *Parser) error
}

func Logger

func Logger(log logger.Format) ParserOption

Logger takes acceptable logger that will be used for logging

func LoggerWithPrefix

func LoggerWithPrefix(log logger.Format, prefix string) ParserOption

Logger takes acceptable logger that will be used for logging, prefix can be defined to distinguish log messages generated in this package

func Path

func Path(path string) ParserOption

Reader takes path where configuration is stored

func Reader

func Reader(ioReader io.Reader) ParserOption

Reader takes io.Reader that will be used to parse data

func String

func String(configuration string) ParserOption

String takes string that will be used to parse data

Jump to

Keyboard shortcuts

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