sub

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sub contains simple subscription management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager defines a subscription manager.

func NewManager

func NewManager() *Manager

NewManager creates a new subscription manager.

func (*Manager) Empty

func (m *Manager) Empty() bool

Empty checks whether there are any subscriptions.

func (*Manager) Notify

func (m *Manager) Notify(resourceKind resource.Kind)

Notify notifies all subscribers about an event for the given resource kind.

func (*Manager) Subscribe

func (m *Manager) Subscribe(resourceKind resource.Kind) Subscription

Subscribe creates a new subscription for the given resource kind.

type Subscription

type Subscription interface {
	NotifyCh() <-chan struct{}
	TriggerNotify()
	Unsubscribe()
}

Subscription is an active subscription interface.

Jump to

Keyboard shortcuts

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