alert

package
v1.99.999 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 23 Imported by: 1

Documentation

Overview

Package alert is a generated GoMock package.

Package alert is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAlertSecretName

func GetAlertSecretName(alertName string) string

GetAlertSecretName returns name of secret used to store configuration for the RadixAlert

func GetSlackConfigSecretKeyName

func GetSlackConfigSecretKeyName(receiverName string) string

GetSlackConfigSecretKeyName returns the secret key name to store Slack webhook URL for a given receiver

Types

type AlertConfig added in v1.16.3

type AlertConfig struct {
	GroupBy    []string
	Resolvable bool
	Scope      AlertScope
}

type AlertConfigs added in v1.16.3

type AlertConfigs map[string]AlertConfig

func GetDefaultAlertConfigs added in v1.16.3

func GetDefaultAlertConfigs() AlertConfigs

GetDefaultAlertConfigs returns list of alert names defined for scope

type AlertScope added in v1.16.3

type AlertScope int

AlertScope defines scope for an alert

const (
	// ApplicationScope contains alerts for failed pipeline jobs
	ApplicationScope AlertScope = iota
	// EnvironmentScope contains alerts for components and jobs in a specific environment
	EnvironmentScope
)

type AlertSyncer

type AlertSyncer interface {
	OnSync() error
}

AlertSyncer defines interface for syncing a RadixAlert

func New

func New(kubeclient kubernetes.Interface,
	kubeutil *kube.Kube,
	radixclient radixclient.Interface,
	prometheusperatorclient monitoring.Interface,
	radixAlert *radixv1.RadixAlert) AlertSyncer

New creates a new alert syncer

type AlertSyncerFactory

type AlertSyncerFactory interface {
	CreateAlertSyncer(
		kubeclient kubernetes.Interface,
		kubeutil *kube.Kube,
		radixclient radixclient.Interface,
		prometheusperatorclient monitoring.Interface,
		radixAlert *v1.RadixAlert) AlertSyncer
}

AlertSyncerFactory defines a factory to create a DeploymentSyncer

type AlertSyncerFactoryFunc

type AlertSyncerFactoryFunc func(
	kubeclient kubernetes.Interface,
	kubeutil *kube.Kube,
	radixclient radixclient.Interface,
	prometheusperatorclient monitoring.Interface,
	radixAlert *v1.RadixAlert,
) AlertSyncer

AlertSyncerFactoryFunc is an adapter that can be used to convert a function into a DeploymentSyncerFactory

func (AlertSyncerFactoryFunc) CreateAlertSyncer

func (f AlertSyncerFactoryFunc) CreateAlertSyncer(
	kubeclient kubernetes.Interface,
	kubeutil *kube.Kube,
	radixclient radixclient.Interface,
	prometheusperatorclient monitoring.Interface,
	radixAlert *v1.RadixAlert,
) AlertSyncer

type MockAlertSyncer

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

MockAlertSyncer is a mock of AlertSyncer interface.

func NewMockAlertSyncer

func NewMockAlertSyncer(ctrl *gomock.Controller) *MockAlertSyncer

NewMockAlertSyncer creates a new mock instance.

func (*MockAlertSyncer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAlertSyncer) OnSync

func (m *MockAlertSyncer) OnSync() error

OnSync mocks base method.

type MockAlertSyncerFactory

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

MockAlertSyncerFactory is a mock of AlertSyncerFactory interface.

func NewMockAlertSyncerFactory

func NewMockAlertSyncerFactory(ctrl *gomock.Controller) *MockAlertSyncerFactory

NewMockAlertSyncerFactory creates a new mock instance.

func (*MockAlertSyncerFactory) CreateAlertSyncer

func (m *MockAlertSyncerFactory) CreateAlertSyncer(kubeclient kubernetes.Interface, kubeutil *kube.Kube, radixclient versioned.Interface, prometheusperatorclient versioned0.Interface, radixAlert *v1.RadixAlert) AlertSyncer

CreateAlertSyncer mocks base method.

func (*MockAlertSyncerFactory) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockAlertSyncerFactoryMockRecorder

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

MockAlertSyncerFactoryMockRecorder is the mock recorder for MockAlertSyncerFactory.

func (*MockAlertSyncerFactoryMockRecorder) CreateAlertSyncer

func (mr *MockAlertSyncerFactoryMockRecorder) CreateAlertSyncer(kubeclient, kubeutil, radixclient, prometheusperatorclient, radixAlert interface{}) *gomock.Call

CreateAlertSyncer indicates an expected call of CreateAlertSyncer.

type MockAlertSyncerMockRecorder

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

MockAlertSyncerMockRecorder is the mock recorder for MockAlertSyncer.

func (*MockAlertSyncerMockRecorder) OnSync

func (mr *MockAlertSyncerMockRecorder) OnSync() *gomock.Call

OnSync indicates an expected call of OnSync.

Jump to

Keyboard shortcuts

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