parser

package
v0.0.0-...-26c87ff Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Overview

Package parser contains all the tools needed to parse the configuration files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSlaves

func ParseSlaves(listSlaves config.ListSlaves) ([]config.ParsedSlave, error)

ParseSlaves parses the list of slaves returned by config.LoadSlaves(), returns a nil list and an error if something went wrong

Types

type SlaveParser

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

SlaveParser is the parser for the type config.ListSlaves. It requires to be initialized with the init method. To parse the asigned config.ListSlaves you may use the Parse() method and it will return a list of registers in the for of Register datatype with a name and the value of register. If you want to retrieve the error from the process of parsing you have the GetReport() method.

func (*SlaveParser) GetReport

func (p *SlaveParser) GetReport() error

GetReport returns the errors of the parser as a common error interface

func (*SlaveParser) Init

func (p *SlaveParser) Init(listSlaves config.ListSlaves)

Init prepares a SlaveParser to work

Jump to

Keyboard shortcuts

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