Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Types = map[*regexp.Regexp]func() Event{ regexp.MustCompile(`minion/refresh/(?P<id>[^/]+)`): New[MinionRefresh], regexp.MustCompile(`salt/auth`): New[MinionAuth], regexp.MustCompile(`salt/beacon/[^/]+/(?P<name>[^/]+)`): New[MinionBeacon], regexp.MustCompile(`salt/job/\d+/new`): New[JobNew], regexp.MustCompile(`salt/job/\d+/ret`): New[JobReturn], regexp.MustCompile(`salt/key`): New[MinionKey], regexp.MustCompile(`salt/minion/[^/]+/start`): New[MinionStart], regexp.MustCompile(`salt/presence/change`): New[PresenceChange], regexp.MustCompile(`salt/presence/present`): New[PresencePresent], }
https://docs.saltstack.com/en/latest/topics/event/master_events.html
Functions ¶
This section is empty.
Types ¶
type Duration ¶
func (*Duration) UnmarshalJSON ¶
type HighStateResult ¶
type HighStateResult struct { Changes map[string]any `json:"changes"` Comment string `json:"comment"` Duration Duration `json:"duration"` Function string `json:"function"` ID string `json:"__id__"` Name string `json:"name"` Order int `json:"__run_num__"` Result bool `json:"result"` SLS string `json:"__sls__"` }
type JobReturn ¶
type JobReturn struct { Arguments []any `json:"fun_args"` Command string `json:"cmd"` Function string `json:"fun"` Job string `json:"jid"` Minion string `json:"id"` Output string `json:"out"` Return salt.Response `json:"return"` ReturnCode int `json:"retcode"` Success bool `json:"success"` Time Time `json:"_stamp"` }
func (*JobReturn) HighState ¶
func (e *JobReturn) HighState() ([]HighStateResult, error)
HighState parses the job return as a highstate return.
type MinionAuth ¶
type MinionBeacon ¶
type MinionRefresh ¶
type MinionStart ¶
type Parser ¶
type Parser struct { Buffer struct { Data salt.Response `json:"data"` Tag string `json:"tag"` } }
Parser represents an event parser.
type PresenceChange ¶
type PresencePresent ¶
Click to show internal directories.
Click to hide internal directories.