worker

package
v0.0.0-...-a8e90f0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventProcessor

type EventProcessor interface {
	ProcessEvent(events.Event) error
	ShouldProcess(events.Event) (bool, *string)
}

EventProcessor provides a mechanism to act on events in the internal queue.

type FakeEventProcessor

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

FakeEventProcessor is fake event processor type

func NewFakeProcessor

func NewFakeProcessor(processEvent func(event events.Event) error) FakeEventProcessor

NewFakeProcessor returns a fake processor struct.

func (FakeEventProcessor) ProcessEvent

func (fp FakeEventProcessor) ProcessEvent(event events.Event) error

ProcessEvent will invoke the callback provided

func (FakeEventProcessor) ShouldProcess

func (fp FakeEventProcessor) ShouldProcess(event events.Event) (bool, *string)

ShouldProcess will return true

type Worker

type Worker struct {
	EventProcessor
}

Worker listens to the eventChannel and runs the EventProcessor.MutateAppGateway and MutateAKS for each event.

func (*Worker) Run

func (w *Worker) Run(work chan events.Event, stopChannel chan struct{})

Run starts the worker which listens for events in eventChannel; stops when stopChannel is closed.

Jump to

Keyboard shortcuts

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