triggers

package
v0.0.0-...-d8f7d12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MergeableTriggers

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

func (*MergeableTriggers) ExportTriggers

func (mt *MergeableTriggers) ExportTriggers() *Triggers

func (*MergeableTriggers) Merge

func (mt *MergeableTriggers) Merge(triggers *Triggers)

type Trigger

type Trigger struct {
	MatchLines []string

	Service    string
	DoReboot   bool `json:",omitempty"`
	HighImpact bool `json:",omitempty"`
	// contains filtered or unexported fields
}

func (*Trigger) ReplaceStrings

func (trigger *Trigger) ReplaceStrings(replaceFunc func(string) string)

type Triggers

type Triggers struct {
	Triggers []*Trigger
	// contains filtered or unexported fields
}

func Decode

func Decode(jsonData []byte) (*Triggers, error)

func Load

func Load(filename string) (*Triggers, error)

func New

func New() *Triggers

func Read

func Read(reader io.Reader) (*Triggers, error)

func (*Triggers) GetMatchStatistics

func (triggers *Triggers) GetMatchStatistics() (nMatched, nUnmatched uint)

func (*Triggers) GetMatchedTriggers

func (triggers *Triggers) GetMatchedTriggers() []*Trigger

func (*Triggers) Len

func (triggers *Triggers) Len() int

func (*Triggers) Less

func (triggers *Triggers) Less(left, right int) bool

func (*Triggers) Match

func (triggers *Triggers) Match(line string)

func (*Triggers) ReplaceStrings

func (triggers *Triggers) ReplaceStrings(replaceFunc func(string) string)

func (*Triggers) Swap

func (triggers *Triggers) Swap(left, right int)

Jump to

Keyboard shortcuts

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