config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxBackupSizeBytes = 10 * 1024 * 1024 // 10MB

Variables

This section is empty.

Functions

func ParseConfiguration

func ParseConfiguration()

func ValidateConfiguration

func ValidateConfiguration()

Types

type RedisEndpoint

type RedisEndpoint struct {
	URL                string `json:"url"`                          // Redis connection URL (redis:// or rediss://)
	Password           string `json:"password,omitempty"`           // Redis password
	Username           string `json:"username,omitempty"`           // Redis username (Redis 6+ ACL)
	DB                 int    `json:"db,omitempty"`                 // Database number (default 0, ignored in cluster mode)
	InsecureSkipVerify bool   `json:"insecureSkipVerify,omitempty"` // Skip TLS verification
	Name               string `json:"name,omitempty"`               // Friendly name for this endpoint

	// Cluster support
	ClusterMode        string `json:"clusterMode,omitempty"`        // "auto" (default), "standalone", or "cluster"
	MaxBackupSizeBytes int64  `json:"maxBackupSizeBytes,omitempty"` // Max total backup size for cache expiration (default 10MB)
}

func GetEndpointByURL

func GetEndpointByURL(url string) *RedisEndpoint

func (*RedisEndpoint) GetMaxBackupSizeBytes added in v1.1.0

func (e *RedisEndpoint) GetMaxBackupSizeBytes() int64

type Specification

type Specification struct {
	// JSON array of Redis endpoints
	EndpointsJSON string `json:"endpointsJson" split_words:"true" required:"true"`
	Endpoints     []RedisEndpoint

	// Discovery intervals in seconds
	DiscoveryIntervalInstanceSeconds int `json:"discoveryIntervalInstanceSeconds" split_words:"true" default:"30"`
	DiscoveryIntervalDatabaseSeconds int `json:"discoveryIntervalDatabaseSeconds" split_words:"true" default:"60"`

	// Attribute exclusion patterns
	DiscoveryAttributesExcludesInstances []string `json:"discoveryAttributesExcludesInstances" split_words:"true"`
	DiscoveryAttributesExcludesDatabases []string `json:"discoveryAttributesExcludesDatabases" split_words:"true"`
}
var (
	Config Specification
)

Jump to

Keyboard shortcuts

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