watcher

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

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

func NewBroadcaster

func NewBroadcaster() *Broadcaster

func (*Broadcaster) Broadcast

func (b *Broadcaster) Broadcast(msg string)

func (*Broadcaster) Subscribe

func (b *Broadcaster) Subscribe() chan string

func (*Broadcaster) Unsubscribe

func (b *Broadcaster) Unsubscribe(ch chan string)

type ConsulWatcher

type ConsulWatcher struct {
	Events *Broadcaster
	// contains filtered or unexported fields
}

func New

func New(logger *slog.Logger, consulAddr, consulToken, consulDC string) *ConsulWatcher

func (*ConsulWatcher) Run

func (w *ConsulWatcher) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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