config

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config provides the query/poller configuration.

Index

Constants

View Source
const (
	DefaultPollInterval   = time.Minute
	DefaultQueueSize      = 60
	DefaultStateRetention = 30 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Interval  metav1.Duration `json:"interval"`
	QueueSize int             `json:"queue_size"`
	State     *State          `json:"state,omitempty"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) SetDefaultsIfNotSet

func (cfg *Config) SetDefaultsIfNotSet()

type State

type State struct {
	DB *sql.DB `json:"-"`

	// Duration to keep states for.
	Retention metav1.Duration `json:"retention"`
}

Jump to

Keyboard shortcuts

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