watchermanager

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRefreshRate is the default refresh rate for watchers.
	DefaultRefreshRate = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IWatcher

type IWatcher interface {
	// Init, Stop, and Refresh should only be called by watchermanager.
	Init(ctx context.Context) error
	Stop(ctx context.Context) error
	Refresh(ctx context.Context) error
}

type IWatcherManager

type IWatcherManager interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
}

type WatcherManager

type WatcherManager struct {
	Watchers []IWatcher
	// contains filtered or unexported fields
}

func NewWatcherManager

func NewWatcherManager() *WatcherManager

func (*WatcherManager) Start

func (wm *WatcherManager) Start(ctx context.Context) error

func (*WatcherManager) Stop

func (wm *WatcherManager) Stop(ctx context.Context) error

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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