eventnotifier

package
v0.0.0-...-1dfb3b8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2024 Datadog, Inc.

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(client.Object, corev1.Event, types.NotificationType) error
}

func CreateNotifiers

func CreateNotifiers(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 given fields:

func (*NotifierMock) Notify

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

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

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{}) *NotifierMock_Notify_Call

Notify is a helper method to define mock.On call

  • _a0 client.Object
  • _a1 v1.Event
  • _a2 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
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.

Jump to

Keyboard shortcuts

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