facts

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFact

func GetFact(fact string, file string, log *logrus.Entry) ([]byte, gjson.Result, error)

GetFact looks up a single fact from the facts file, errors reading the file is reported but an absent fact is handled as empty result and no error

func HasFact

func HasFact(fact string, operator string, value string, file string, log *logrus.Entry) (bool, error)

HasFact evaluates the expression against facts in the file

func JSON

func JSON(file string, log *logrus.Entry) (json.RawMessage, error)

JSON parses the data, including doing any conversions needed, and returns JSON text

func Match

func Match(filters [][3]string, fw *choria.Framework, log *logrus.Entry) bool

Match match fact filters in a OR manner, only nodes that have all the matching facts will be true here

Types

This section is empty.

Jump to

Keyboard shortcuts

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