discover

package
v3.0.0-beta12 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package discover implements object discovery for daemon

It watches config filesystem to create initial instance config worker when config file is created. Instance config worker is then responsible for watching instance config updates

When is discovers that another remote config is available and no instance config worker is running, it fetches remote instance config to local config directory.

It is responsible for initial object status worker creation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debouncer

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

func (*Debouncer) Debounce

func (d *Debouncer) Debounce(wait time.Duration, fn func())

type Manager

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

func NewManager

func NewManager(drainDuration time.Duration, subQS pubsub.QueueSizer) *Manager

NewManager initialize discover.Manager with drainDuration, and sub queue sizes for discover.cfg and discover.omon components.

It returns *T.

It doesn't define imon starter, and sub queue size for future created omon components. So WithImonStarter and WithOmonSubQS must be called on the returned *T

func (*Manager) PubDebounce

func (t *Manager) PubDebounce(key string, v pubsub.Messager, labels ...pubsub.Label)

func (*Manager) Start

func (t *Manager) Start(ctx context.Context) (err error)

Start function starts file system watcher on config directory then listen for config file creation to create.

func (*Manager) Stop

func (t *Manager) Stop() error

func (*Manager) WithImonStarter

func (t *Manager) WithImonStarter(f imon.Factory) *Manager

WithImonStarter defines the imon factory

func (*Manager) WithOmonSubQS

func (t *Manager) WithOmonSubQS(qs pubsub.QueueSizer) *Manager

WithOmonSubQS defines the subscription queue size of omon created components.

Jump to

Keyboard shortcuts

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