eventnotifier

package
v0.0.0-...-4f258c4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	GetNotifierName() string
	Notify(context.Context, client.Object, corev1.Event, types.NotificationType) error
}

func CreateNotifiers

func CreateNotifiers(ctx context.Context, config NotifiersConfig, logger *zap.SugaredLogger) (notifiers []Notifier, err error)

CreateNotifiers creates and returns a list of Notifier instances

type NotifierMock

type NotifierMock struct {
	mock.Mock
}

NotifierMock is an autogenerated mock type for the Notifier type

func NewNotifierMock

func NewNotifierMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *NotifierMock

NewNotifierMock creates a new instance of NotifierMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*NotifierMock) EXPECT

func (_m *NotifierMock) EXPECT() *NotifierMock_Expecter

func (*NotifierMock) GetNotifierName

func (_m *NotifierMock) GetNotifierName() string

GetNotifierName provides a mock function with no fields

func (*NotifierMock) Notify

func (_m *NotifierMock) Notify(_a0 context.Context, _a1 client.Object, _a2 v1.Event, _a3 types.NotificationType) error

Notify provides a mock function with given fields: _a0, _a1, _a2, _a3

type NotifierMock_Expecter

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

func (*NotifierMock_Expecter) GetNotifierName

GetNotifierName is a helper method to define mock.On call

func (*NotifierMock_Expecter) Notify

func (_e *NotifierMock_Expecter) Notify(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 interface{}) *NotifierMock_Notify_Call

Notify is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 client.Object
  • _a2 v1.Event
  • _a3 types.NotificationType

type NotifierMock_GetNotifierName_Call

type NotifierMock_GetNotifierName_Call struct {
	*mock.Call
}

NotifierMock_GetNotifierName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNotifierName'

func (*NotifierMock_GetNotifierName_Call) Return

func (*NotifierMock_GetNotifierName_Call) Run

func (*NotifierMock_GetNotifierName_Call) RunAndReturn

type NotifierMock_Notify_Call

type NotifierMock_Notify_Call struct {
	*mock.Call
}

NotifierMock_Notify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Notify'

func (*NotifierMock_Notify_Call) Return

func (*NotifierMock_Notify_Call) Run

func (*NotifierMock_Notify_Call) RunAndReturn

type NotifiersConfig

type NotifiersConfig struct {
	Common  types.NotifiersCommonConfig   `json:"common" yaml:"common"`
	Noop    noop.NotifierNoopConfig       `json:"noop" yaml:"noop"`
	Slack   slack.NotifierSlackConfig     `json:"slack" yaml:"slack"`
	Datadog datadog.NotifierDatadogConfig `json:"datadog" yaml:"datadog"`
	HTTP    http.Config                   `json:"http" yaml:"http"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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