controller

package
v1.0.43 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectionStateConnected    = "Connected"
	ConnectionStateDisconnected = "Disconnected"
	ConnectionStateError        = "Error"
	ConnectionStateStarting     = "Starting"
)
View Source
const (
	ConditionTypeReady       = "Ready"
	ConditionTypeProgressing = "Progressing"
	ConditionTypeDegraded    = "Degraded"
)

Variables

This section is empty.

Functions

func GetScheme

func GetScheme() *runtime.Scheme

func SetupWithManager

func SetupWithManager(mgr ctrl.Manager, rootCtx dutyctx.Context) error

Types

type BatchTriggerReconciler

type BatchTriggerReconciler struct {
	client.Client
	Scheme  *runtime.Scheme
	Manager *ConsumerManager
}

func (*BatchTriggerReconciler) Reconcile

func (r *BatchTriggerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*BatchTriggerReconciler) SetupWithManager

func (r *BatchTriggerReconciler) SetupWithManager(mgr ctrl.Manager) error

type ConsumerManager

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

func NewConsumerManager

func NewConsumerManager(rootCtx dutyctx.Context) *ConsumerManager

func (*ConsumerManager) GetStats

func (*ConsumerManager) IsRunning

func (m *ConsumerManager) IsRunning(key types.NamespacedName) bool

func (*ConsumerManager) Start

func (m *ConsumerManager) Start(key types.NamespacedName, config *v1.Config) error

func (*ConsumerManager) Stop

func (m *ConsumerManager) Stop(key types.NamespacedName)

func (*ConsumerManager) StopAll

func (m *ConsumerManager) StopAll()

func (*ConsumerManager) UpdateConfig

func (m *ConsumerManager) UpdateConfig(key types.NamespacedName, newConfig *v1.Config) error

type ConsumerStats

type ConsumerStats struct {
	MessagesProcessed int64
	MessagesFailed    int64
	MessagesRetried   int64
	LastError         string
	LastErrorTime     time.Time
	ConnectionState   string
	// contains filtered or unexported fields
}

func (*ConsumerStats) RecordFailed

func (s *ConsumerStats) RecordFailed(err error)

func (*ConsumerStats) RecordProcessed

func (s *ConsumerStats) RecordProcessed()

func (*ConsumerStats) RecordRetried

func (s *ConsumerStats) RecordRetried()

func (*ConsumerStats) SetConnectionState

func (s *ConsumerStats) SetConnectionState(state string)

func (*ConsumerStats) Snapshot

func (s *ConsumerStats) Snapshot() ConsumerStats

type ManagedConsumer

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

Jump to

Keyboard shortcuts

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