Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlertTemplateData ¶
AlertTemplateData returns the interface to be used in expanding the template.
Types ¶
type Expander ¶
type Expander struct {
// contains filtered or unexported fields
}
Expander executes templates in text or HTML mode with a common set of Prometheus template functions.
func NewTemplateExpander ¶
func NewTemplateExpander( ctx context.Context, text string, name string, data interface{}, timestamp model.Time, queryFunc QueryFunc, externalURL *url.URL, ) *Expander
NewTemplateExpander returns a template expander ready to use.
func (Expander) ExpandHTML ¶
ExpandHTML expands a template with HTML escaping, with templates read from the given files.
func (Expander) Funcs ¶
func (te Expander) Funcs(fm text_template.FuncMap)
Funcs adds the functions in fm to the Expander's function map. Existing functions will be overwritten in case of conflict.
Click to show internal directories.
Click to hide internal directories.