templates

package
v1.23.9 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromqlTpl

type PromqlTpl struct {
	ScopeID          uint   `json:"scopeID"`
	ScopeName        string `json:"scopeName"`
	ScopeShowName    string `json:"scopeShowName"`
	ResourceID       uint   `json:"resourceID"`
	ResourceName     string `json:"resourceName"`
	ResourceShowName string `json:"resourceShowName"`
	RuleID           uint   `json:"ruleID"`
	RuleName         string `json:"ruleName"`
	RuleShowName     string `json:"ruleShowName"`

	TenantID *uint `json:"tenantID"`

	Namespaced bool                    `json:"namespaced"`
	Expr       string                  `json:"expr"`
	Unit       string                  `json:"unit"`
	Labels     gormdatatypes.JSONSlice `json:"labels"`
}

func (*PromqlTpl) String

func (tpl *PromqlTpl) String() string

type PromqlTplMapper

type PromqlTplMapper struct {
	M   map[string]*PromqlTpl
	Err error
}

func (*PromqlTplMapper) FindPromqlTpl

func (m *PromqlTplMapper) FindPromqlTpl(scope, resource, rule string) (*PromqlTpl, error)

func (*PromqlTplMapper) FindPromqlTplWithoutScope

func (m *PromqlTplMapper) FindPromqlTplWithoutScope(resource, rule string) (*PromqlTpl, error)

type TplGetter

type TplGetter func(scope, resource, rule string) (*PromqlTpl, error)

Jump to

Keyboard shortcuts

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