config

package
v1.0.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfiguration

func ParseConfiguration()

func ValidateConfiguration

func ValidateConfiguration()

Types

type AMQPOptions

type AMQPOptions struct {
	URL                string `json:"url,omitempty"`
	Vhost              string `json:"vhost,omitempty"`
	Username           string `json:"username,omitempty"`
	Password           string `json:"password,omitempty"`
	InsecureSkipVerify bool   `json:"insecureSkipVerify,omitempty"`
	CAFile             string `json:"caFile,omitempty"`
}

type ManagementEndpoint

type ManagementEndpoint struct {
	URL                string       `json:"url"`
	Username           string       `json:"username,omitempty"`
	Password           string       `json:"password,omitempty"`
	InsecureSkipVerify bool         `json:"insecureSkipVerify,omitempty"`
	CAFile             string       `json:"caFile,omitempty"`
	AMQP               *AMQPOptions `json:"amqp,omitempty"`
}

ManagementEndpoint is the configuration specification for the extension. Configuration values can be applied through environment variables. Learn more through the documentation of the envconfig package. https://github.com/kelseyhightower/envconfig

func GetEndpointByAMQPURL

func GetEndpointByAMQPURL(amqpURL string) (*ManagementEndpoint, error)

GetEndpointByAMQPURL returns the management endpoint configuration matching the provided AMQP URL. It compares against the AMQP.URL field of each configured ManagementEndpoint.

func GetEndpointByMgmtURL

func GetEndpointByMgmtURL(mgmtURL string) (*ManagementEndpoint, error)

type Specification

type Specification struct {
	// Required: structured endpoints as JSON (array of ManagementEndpoint)
	ManagementEndpointsJSON string               `json:"managementEndpointsJson" split_words:"true" required:"true"`
	ManagementEndpoints     []ManagementEndpoint `json:"-"`

	// Optional global TLS defaults applied when an endpoint omits its own
	InsecureSkipVerify         bool   `json:"insecureSkipVerify" required:"false" split_words:"true"`
	RabbitClusterCertChainFile string `json:"rabbitClusterCertChainFile" required:"false" split_words:"true"`
	RabbitClusterCertKeyFile   string `json:"rabbitClusterCertKeyFile" required:"false" split_words:"true"`
	RabbitClusterCaFile        string `json:"rabbitClusterCaFile" required:"false" split_words:"true"`

	// Discovery
	DiscoveryIntervalVhostSeconds     int      `json:"discoveryIntervalVhostSeconds" split_words:"true" required:"false" default:"30"`
	DiscoveryIntervalNodeSeconds      int      `json:"discoveryIntervalNodeSeconds" split_words:"true" required:"false" default:"30"`
	DiscoveryIntervalQueueSeconds     int      `json:"discoveryIntervalQueueSeconds" split_words:"true" required:"false" default:"120"`
	DiscoveryAttributesExcludesVhosts []string `json:"discoveryAttributesExcludesVhosts" split_words:"true" required:"false"`
	DiscoveryAttributesExcludesQueues []string `json:"discoveryAttributesExcludesQueues" split_words:"true" required:"false"`
	DiscoveryAttributesExcludesNodes  []string `json:"discoveryAttributesExcludesNodes" split_words:"true" required:"false"`
}
var (
	Config Specification
)

Jump to

Keyboard shortcuts

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