config

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = bininfo.Version()
	BuildTime = bininfo.BuildDate()
	Global    Archer
)

Functions

func GetApiBaseUrl

func GetApiBaseUrl(r *http.Request) string

func InitSentry

func InitSentry()

func IsDebug

func IsDebug() bool

func ParseConfig

func ParseConfig(parser *flags.Parser)

func ResolveHost

func ResolveHost()

Types

type Agent

type Agent struct {
	Devices                []string      `long:"device" ini-name:"device[]" description:"F5 Hostnames"`
	VCMPs                  []string      `long:"vcmp" ini-name:"vcmp[]" description:"F5 Platform Hostnames"`
	ValidateCert           bool          `long:"validate-certificates" ini-name:"validate_certificates" description:"Validate HTTPS Certificate."`
	PhysicalNetwork        string        `long:"physical-network" ini-name:"physical_network" env:"PHYSICAL_NETWORK" description:"Physical Network"`
	PhysicalInterface      string        `long:"physical-interface" ini-name:"physical_interface" description:"Physical Interface" default:"portchannel1"`
	PendingSyncInterval    time.Duration `` /* 143-byte string literal not displayed */
	HealthScrapeInterval   time.Duration `` /* 135-byte string literal not displayed */
	HealthScrapePrometheus string        `` /* 171-byte string literal not displayed */
	CreateService          bool          `` /* 158-byte string literal not displayed */
	ServicePublic          bool          `` /* 130-byte string literal not displayed */
	ServiceName            string        `long:"service-name" ini-name:"service_name" description:"Service name for auto-created service. Deprecated."`
	ServicePort            int           `long:"service-port" ini-name:"service_port" description:"Service port for auto-created service. Deprecated."`
	ServicePorts           []string      `long:"service-ports" ini-name:"service_ports[]" description:"Service ports for auto-created service. Deprecated."`
	ServiceRequireApproval bool          `long:"service-require-approval" ini-name:"service_require_approval" description:"Service requires approval. Deprecated."`
	ServiceUpstreamHost    string        `long:"service-upstream-host" ini-name:"service_upstream_host" description:"Service upstream host."`
	ServiceProtocol        string        `long:"service-protocol" ini-name:"service_protocol" description:"Service protocol. Deprecated."`
	TempDir                string        `long:"temp-dir" ini-name:"temp_dir" description:"Temporary directory used for temporary files" default:"/tmp"`
	L4Profile              string        `long:"l4-profile" ini-name:"l4_profile" description:"L4 profile to use for F5 endpoint service." default:"/Common/fastL4"`
	TCPProfile             string        `long:"tcp-profile" ini-name:"tcp_profile" description:"TCP profile to use for F5 endpoint service." default:"/Common/tcp"`
	MaxRetries             uint64        `long:"max-retries" ini-name:"max_retries" description:"Maximum number of retries for F5 operations." default:"3"`
	MaxDuration            time.Duration `` /* 136-byte string literal not displayed */

	// Scheduling configuration
	HeartbeatInterval       time.Duration `long:"heartbeat-interval" ini-name:"heartbeat_interval" default:"30s" description:"Interval for agent heartbeat updates."`
	AgentStaleTimeout       time.Duration `` /* 134-byte string literal not displayed */
	RescheduleCheckInterval time.Duration `` /* 163-byte string literal not displayed */
	RebalanceDelay          time.Duration `` /* 136-byte string literal not displayed */
	RebalanceThreshold      float64       `` /* 144-byte string literal not displayed */
	RebalanceMaxMigrations  int           `` /* 142-byte string literal not displayed */
}

type ApiSettings

type ApiSettings struct {
	PolicyFile                string  `long:"policy-file" ini-name:"policy_file" description:"Use policy file" default:"policy.ini"`
	AuthStrategy              string  `` /* 148-byte string literal not displayed */
	PolicyEngine              string  `long:"policy-engine" ini-name:"policy_engine" description:"Policy engine to use, currently supported: [goslo, noop]"`
	DisablePagination         bool    `long:"disable-pagination" ini-name:"disable_pagination" description:"Disable the usage of pagination"`
	DisableSorting            bool    `long:"disable-sorting" ini-name:"disable_sorting" description:"Disable the usage of sorting"`
	PaginationMaxLimit        int64   `` /* 147-byte string literal not displayed */
	RateLimit                 float64 `long:"rate-limit" ini-name:"rate_limit" default:"100" description:"Maximum number of requests to limit per second."`
	DisableCors               bool    `` /* 138-byte string literal not displayed */
	EnableProxyHeadersParsing bool    `` /* 145-byte string literal not displayed */
}

type Archer

type Archer struct {
	Version func() `short:"v" long:"version" description:"Show application version"`

	ConfigFile   []string     `long:"config-file" description:"Use config file"`
	Default      Default      `group:"DEFAULT"`
	Database     Database     `group:"database"`
	ApiSettings  ApiSettings  `group:"api_settings"`
	ServiceAuth  AuthInfo     `group:"service_auth"`
	Quota        Quota        `group:"quota"`
	Audit        Audit        `group:"audit_middleware_notifications"`
	Notification Notification `group:"notification"`
	Agent        Agent        `group:"agent"`
}

type Audit

type Audit struct {
	Enabled      bool   `long:"enable-audit" ini-name:"enabled" description:"Enables message notification bus."`
	TransportURL string `` /* 176-byte string literal not displayed */
	QueueName    string `long:"queue-name" ini-name:"queue_name" description:"RabbitMQ queue name"`
}

type AuthInfo

type AuthInfo struct {
	AuthURL                     string `ini-name:"auth_url"`
	Token                       string `ini-name:"token"`
	Username                    string `ini-name:"username"`
	UserID                      string `ini-name:"user_id" `
	Password                    string `ini-name:"password" env:"OS_PASSWORD"`
	ApplicationCredentialID     string `ini-name:"application_credential_id"`
	ApplicationCredentialName   string `ini-name:"application_credential_name" `
	ApplicationCredentialSecret string `ini-name:"application_credential_secret" `
	SystemScope                 string `ini-name:"system_scope" `
	ProjectName                 string `ini-name:"project_name"`
	ProjectID                   string `ini-name:"project_id" `
	UserDomainName              string `ini-name:"user_domain_name"`
	UserDomainID                string `ini-name:"user_domain_id"`
	ProjectDomainName           string `ini-name:"project_domain_name" `
	ProjectDomainID             string `ini-name:"project_domain_id" `
	DomainName                  string `ini-name:"domain_name"`
	DomainID                    string `ini-name:"domain_id"`
	DefaultDomain               string `ini-name:"default_domain"`
	AllowReauth                 bool   `ini-name:"allow_reauth"`
	TrustID                     string `ini-name:"trust_id"`
}

type Database

type Database struct {
	Connection string `long:"database-connection" ini-name:"connection" description:"Connection string to use to connect to the database."`
	Trace      bool   `long:"database-trace" ini-name:"trace" description:"Enable tracing of SQL queries"`
}

type Default

type Default struct {
	Debug            bool   `short:"d" long:"debug" description:"Show debug information"`
	AvailabilityZone string `long:"availability-zone" ini-name:"availability_zone" description:"Availability zone of this node." env:"AVAILABILITY_ZONE"`
	Host             string `long:"hostname" ini-name:"host" description:"Hostname used by the server/agent. Defaults to auto-discovery."`
	Prometheus       bool   `long:"prometheus" description:"Enable prometheus exporter."`
	PrometheusListen string `` /* 131-byte string literal not displayed */
	Sentry           bool   `long:"sentry" ini-name:"sentry" description:"Enable Sentry"`
	SentryDSN        string `long:"sentry-dsn" ini-name:"sentry_dsn" description:"Sentry Data Source Name."`
	EndpointType     string `ini-name:"endpoint_type" default:"public"`
}

type Notification

type Notification struct {
	Enabled      bool   `long:"enable-notifications" ini-name:"enabled" description:"Enable email notifications via campfire."`
	CampfireURL  string `` /* 178-byte string literal not displayed */
	TemplatePath string `` /* 143-byte string literal not displayed */
	DigestCron   string `` /* 132-byte string literal not displayed */
	MimeType     string `long:"mime-type" ini-name:"mime_type" default:"text/plain; charset=utf-8" description:"MIME type to use for email templates"`
}

type Quota

type Quota struct {
	Enabled              bool  `long:"enable-quota" ini-name:"enabled" description:"Enable quotas."`
	DefaultQuotaService  int64 `long:"default-quota-service" ini-name:"service" default:"0" description:"Default quota of services per project."`
	DefaultQuotaEndpoint int64 `long:"default-quota-endpoint" ini-name:"endpoint" default:"0" description:"Default quota of endpoints per project."`
}

Jump to

Keyboard shortcuts

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