options

package
v5.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 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 NoNamedDefaultsFrom = noNamedDefaultsFrom{} //nolint:gochecknoglobals

NoNamedDefaultsFrom sets flag to disable named defaults from in section

View Source
var UseListenSectionParsers = useListenSectionParsers{} //nolint:gochecknoglobals

UseListenSectionParsers sets flag to use listen section parser

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
	UseListenSectionParsers bool
	DisableUnProcessed      bool
	Log                     bool
	LogPrefix               string
	NoNamedDefaultsFrom     bool
}

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