announcer

package
v0.0.0-...-329b25f Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Event action describes what action was taken
	EventActionReconcile = "Reconcile"
	EventActionCreate    = "Create"
	EventActionUpdate    = "Update"
	EventActionDelete    = "Delete"
	EventActionProgress  = "Progress"
)
View Source
const (
	// Short, machine understandable string that gives the reason for the transition into the object's current status
	EventReasonReconcileStarted       = "ReconcileStarted"
	EventReasonReconcileInProgress    = "ReconcileInProgress"
	EventReasonReconcileCompleted     = "ReconcileCompleted"
	EventReasonReconcileFailed        = "ReconcileFailed"
	EventReasonCreateStarted          = "CreateStarted"
	EventReasonCreateInProgress       = "CreateInProgress"
	EventReasonCreateCompleted        = "CreateCompleted"
	EventReasonCreateFailed           = "CreateFailed"
	EventReasonUpdateStarted          = "UpdateStarted"
	EventReasonUpdateInProgress       = "UpdateInProgress"
	EventReasonUpdateCompleted        = "UpdateCompleted"
	EventReasonUpdateFailed           = "UpdateFailed"
	EventReasonDeleteStarted          = "DeleteStarted"
	EventReasonDeleteInProgress       = "DeleteInProgress"
	EventReasonDeleteCompleted        = "DeleteCompleted"
	EventReasonDeleteFailed           = "DeleteFailed"
	EventReasonProgressHostsCompleted = "ProgressHostsCompleted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcer

type Announcer struct {
	a.Announcer
	// contains filtered or unexported fields
}

Announcer handler all log/event/status messages going outside of controller/worker

func NewAnnouncer

func NewAnnouncer(eventEmitter interfaces.IEventEmitter, statusUpdater interfaces.IKubeCR) Announcer

NewAnnouncer creates new announcer

func (Announcer) A

func (a Announcer) A() Announcer

A adds full code address as 'file:line:function'

func (Announcer) E

func (a Announcer) E() Announcer

E adds 'end of the function' tag

func (Announcer) Error

func (a Announcer) Error(format string, args ...interface{})

Error is inspired by log.Errorf()

func (Announcer) F

func (a Announcer) F() Announcer

F adds function name

func (Announcer) FL

func (a Announcer) FL() Announcer

FL adds filename

func (Announcer) Fatal

func (a Announcer) Fatal(format string, args ...interface{})

Fatal is inspired by log.Fatalf()

func (Announcer) Info

func (a Announcer) Info(format string, args ...interface{})

Info is inspired by log.Infof()

func (Announcer) L

func (a Announcer) L() Announcer

L adds line number

func (Announcer) M

func (a Announcer) M(m ...interface{}) Announcer

M adds object meta as 'namespace/name'

func (Announcer) P

func (a Announcer) P()

P triggers log to print line

func (Announcer) S

func (a Announcer) S() Announcer

S adds 'start of the function' tag

func (Announcer) Silence

func (a Announcer) Silence() Announcer

Silence produces silent announcer

func (Announcer) V

func (a Announcer) V(level log.Level) Announcer

V is inspired by log.V()

func (Announcer) Warning

func (a Announcer) Warning(format string, args ...interface{})

Warning is inspired by log.Warningf()

func (Announcer) WithAction

func (a Announcer) WithAction(cr api.ICustomResource) Announcer

WithAction is used in chained calls in order to produce action into `ClickHouseInstallation.Status.Action`

func (Announcer) WithActions

func (a Announcer) WithActions(cr api.ICustomResource) Announcer

WithActions is used in chained calls in order to produce action in ClickHouseInstallation.Status.Actions

func (Announcer) WithError

func (a Announcer) WithError(cr api.ICustomResource) Announcer

WithError is used in chained calls in order to produce error in ClickHouseInstallation.Status.Error

func (Announcer) WithEvent

func (a Announcer) WithEvent(cr api.ICustomResource, action string, reason string) Announcer

WithEvent is used in chained calls in order to produce event into `chi`

type EventEmitter

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

func NewEventEmitter

func NewEventEmitter(
	kubeEvent interfaces.IKubeEvent,
	kind string,
	generateName string,
	component string,
) *EventEmitter

func (*EventEmitter) Event

func (c *EventEmitter) Event(level string, obj meta.Object, action string, reason string, message string)

func (*EventEmitter) EventError

func (c *EventEmitter) EventError(obj meta.Object, action string, reason string, message string)

EventError emits event Error

func (*EventEmitter) EventInfo

func (c *EventEmitter) EventInfo(obj meta.Object, action string, reason string, message string)

EventInfo emits event Info

func (*EventEmitter) EventWarning

func (c *EventEmitter) EventWarning(obj meta.Object, action string, reason string, message string)

EventWarning emits event Warning

Jump to

Keyboard shortcuts

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