reload

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WebSocketPath = "/__shadowfax/events"
)

Variables

This section is empty.

Functions

func BroadcastWhenHealthy

func BroadcastWhenHealthy(ctx context.Context, healthURL string, broadcaster *Broadcaster)

Types

type Broadcaster

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

Broadcaster is a thread-safe pub/sub for reload events. Listeners can subscribe to receive reload signals.

func NewBroadcaster

func NewBroadcaster() *Broadcaster

func (*Broadcaster) Broadcast

func (b *Broadcaster) Broadcast()

func (*Broadcaster) ListenerCount

func (b *Broadcaster) ListenerCount() int

func (*Broadcaster) Subscribe

func (b *Broadcaster) Subscribe() chan struct{}

func (*Broadcaster) Unsubscribe

func (b *Broadcaster) Unsubscribe(ch chan struct{})

type HealthChecker

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

func NewHealthChecker

func NewHealthChecker(url string) *HealthChecker

func (*HealthChecker) IsHealthy

func (h *HealthChecker) IsHealthy(ctx context.Context) bool

func (*HealthChecker) WaitForHealthy

func (h *HealthChecker) WaitForHealthy(ctx context.Context, pollInterval time.Duration) error

func (*HealthChecker) WaitForHealthyWithTimeout

func (h *HealthChecker) WaitForHealthyWithTimeout(timeout time.Duration, pollInterval time.Duration) error

type WebSocketHandler

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

func NewWebSocketHandler

func NewWebSocketHandler(broadcaster *Broadcaster) *WebSocketHandler

func (*WebSocketHandler) ServeHTTP

func (h *WebSocketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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