alerter

package
v0.0.0-...-27b3d77 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lint

func Lint(ctx context.Context, opts *AlerterOpts, path string) error

func NewLinter

func NewLinter() *lintAlertHandler

Types

type Alerter

type Alerter struct {
	CtrlCli client.Client
	// contains filtered or unexported fields
}

func NewService

func NewService(opts *AlerterOpts) (*Alerter, error)

func (*Alerter) Close

func (l *Alerter) Close() error

func (*Alerter) Open

func (l *Alerter) Open(ctx context.Context) error

type AlerterOpts

type AlerterOpts struct {
	Dev            bool
	KustoEndpoints map[string]string
	Region         string
	AlertAddr      string
	Cloud          string
	Port           int
	Concurrency    int

	Tags map[string]string

	// MaxNotifications is the maximum number of notifications to send per rule.
	MaxNotifications int

	// Managed Identity options
	MSIID       string
	MSIResource string

	// Application Token options
	KustoToken string

	CtrlCli client.Client
}

type KustoClient

type KustoClient interface {
	Mgmt(ctx context.Context, db string, query kusto.Stmt, options ...kusto.MgmtOption) (*kusto.RowIterator, error)
	Query(ctx context.Context, db string, query kusto.Stmt, options ...kusto.QueryOption) (*kusto.RowIterator, error)
	Endpoint() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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