config

package
v0.0.0-...-fcecc91 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPagedRpmInsertsLimit      = 500
	DefaultIntrospectApiTimeLimitSec = 30
)
View Source
const (
	RepositorySnapshotTask        = "snapshot"                    // Task to create a snapshot for a repository config
	DeleteRepositorySnapshotsTask = "delete-repository-snapshots" // Task to delete all snapshots for a repository config
	DeleteSnapshotsTask           = "delete-snapshots"            // Task to delete all snapshots marked for deletion
	IntrospectTask                = "introspect"                  // Task to introspect repository
	DeleteTemplatesTask           = "delete-templates"            // Task to delete all content templates marked for deletion
	UpdateTemplateContentTask     = "update-template-content"     // Task to update the pulp distributions of a template's snapshots
	UpdateRepositoryTask          = "update-repository"           // Task to update repository information in candlepin when the repository is updated
	AddUploadsTask                = "add-uploads-repository"      // Task to add uploaded files/artifacts to a repository
	UpdateLatestSnapshotTask      = "update-latest-snapshot"      // Task to update templates to use the latest snapshot of a repository
)
View Source
const (
	TaskStatusRunning   = "running"   // Task is running
	TaskStatusFailed    = "failed"    // Task has failed
	TaskStatusCompleted = "completed" // Task has completed
	TaskStatusCanceled  = "canceled"  // Task has been canceled
	TaskStatusPending   = "pending"   // Task is waiting to be started
)
View Source
const (
	StatusValid       = "Valid"       // Repository introspected successfully
	StatusUnavailable = "Unavailable" // Repository introspected at least once, but now errors
	StatusInvalid     = "Invalid"     // Repository has never introspected due to error
	StatusPending     = "Pending"     // Repository not introspected yet.
)
View Source
const (
	OriginExternal  = "external"
	OriginRedHat    = "red_hat"
	OriginUpload    = "upload"
	OriginCommunity = "community"
)
View Source
const (
	EPEL10Url = "https://dl.fedoraproject.org/pub/epel/10/Everything/x86_64/"
	EPEL9Url  = "https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/"
	EPEL8Url  = "https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/"
)
View Source
const AARCH64 = "aarch64"
View Source
const ANY_ARCH = "any"
View Source
const ANY_VERSION = "any"
View Source
const CommunityDomainName = "cs-community"
View Source
const CommunityOrg = "-2"
View Source
const (
	ContentTypeRpm = "rpm"
)
View Source
const DefaultAppName = "content-sources"
View Source
const E4S = "e4s"
View Source
const EEUS = "eeus"
View Source
const EUS = "eus"
View Source
const El10 = "10"
View Source
const El7 = "7"
View Source
const El8 = "8"
View Source
const El9 = "9"
View Source
const FailedIntrospectionsLimit = 20
View Source
const FailedSnapshotLimit = 10 // Number of times to retry a snapshot before stopping
View Source
const HeaderRequestId = "x-rh-insights-request-id" // the header that contains the request ID
View Source
const IntrospectTimeInterval = time.Hour * 23
View Source
const ObjectTypeRepository = "repository"
View Source
const ObjectTypeTemplate = "template"
View Source
const PPC64LE = "ppc64le"
View Source
const RedHatDomainName = "cs-redhat" // Note the RH domain name may not be set to this in all environments
View Source
const RedHatGpgKeyPath = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
View Source
const RedHatOrg = "-1"
View Source
const RepoClowderBucketName = "content-sources-central-pulp-s3"
View Source
const RequestIdLoggingKey = "request_id" // the key that represents the request ID when logged
View Source
const RhCertEnv = "RH_CDN_CERT_PAIR"

This is for passing the certificate and key directly, not the file path.

View Source
const S390x = "s390x"
View Source
const STORAGE_TYPE_LOCAL = "local"
View Source
const STORAGE_TYPE_OBJECT = "object"
View Source
const SnapshotForceInterval = 24 // In hours
View Source
const X8664 = "x86_64"

Variables

View Source
var DistributionArches = [...]DistributionArch{
	{
		Name:  "Any",
		Label: ANY_ARCH,
	},
	{
		Name:  "aarch64",
		Label: AARCH64,
	},
	{
		Name:  "ppc64le",
		Label: PPC64LE,
	},
	{
		Name:  "s390x",
		Label: S390x,
	},
	{
		Name:  "x86_64",
		Label: X8664,
	},
}
View Source
var DistributionMinorVersions = [...]DistributionMinorVersion{
	{Name: "RHEL 8.6", Label: "8.6", Major: El8, ExtendedReleaseStreams: []string{E4S}},
	{Name: "RHEL 8.8", Label: "8.8", Major: El8, ExtendedReleaseStreams: []string{E4S}},
	{Name: "RHEL 9.0", Label: "9.0", Major: El9, ExtendedReleaseStreams: []string{E4S, EEUS}},
	{Name: "RHEL 9.2", Label: "9.2", Major: El9, ExtendedReleaseStreams: []string{E4S, EEUS}},
	{Name: "RHEL 9.4", Label: "9.4", Major: El9, ExtendedReleaseStreams: []string{EUS, E4S, EEUS}},
	{Name: "RHEL 9.6", Label: "9.6", Major: El9, ExtendedReleaseStreams: []string{EUS, E4S, EEUS}},
	{Name: "RHEL 10.0", Label: "10.0", Major: El10, ExtendedReleaseStreams: []string{EUS, EEUS}},
}
View Source
var DistributionVersions = [...]DistributionVersion{
	{
		Name:  "Any",
		Label: ANY_VERSION,
	},
	{
		Name:  "RHEL 7",
		Label: El7,
	}, {
		Name:  "RHEL 8",
		Label: El8,
	}, {
		Name:  "RHEL 9",
		Label: El9,
	}, {
		Name:  "RHEL 10",
		Label: El10,
	},
}
View Source
var ExtendedReleaseLabelToFeature = map[[2]string]string{
	{EUS, X8664}:    "RHEL-EUS-x86_64",
	{EUS, AARCH64}:  "RHEL-EUS-aarch64",
	{E4S, X8664}:    "RHEL-E4S-x86_64",
	{EEUS, X8664}:   "RHEL-EEUS-x86_64",
	{EEUS, AARCH64}: "RHEL-EEUS-aarch64",
}
View Source
var ExtendedReleaseStreamNames = map[string]string{
	EUS:  "Extended Update Support (EUS)",
	E4S:  "Update Services for SAP Solutions (E4S)",
	EEUS: "Enhanced Extended Update Support (EEUS)",
}

ExtendedReleaseStreamNames maps stream labels to display names

View Source
var MemoPulpLastSuccessfulPulpLogParse = "last_successful_pulp_log_date"

Memo Keys

View Source
var PopularRepos []PopularRepository
View Source
var SubscriptionFeaturesIgnored = []string{"RHEL-OS-x86_64", ""}

Features that do not currently use a subscription check, available to all users

View Source
var Tang *tangy.Tangy

TasksToCleanup tasks that will get deleted, completed, canceled or failed, if older than 20 days

TasksToCleanupIfCompleted tasks that will get deleted if older than 10 days, only if status is completed

Functions

func CDNCertDaysTillExpiration

func CDNCertDaysTillExpiration() (int, error)

func CandlepinConfigured

func CandlepinConfigured() bool

func ClowderS3Url

func ClowderS3Url(c clowder.ObjectStoreConfig) string

func ConfigureCertificate

func ConfigureCertificate() (*tls.Certificate, *string, error)

ConfigureCertificate loads in a cert keypair from either, an environment variable if specified, or a file path (see configs/config.yaml.example) If no certificate is specified, we return no error however if a certificate is specified but cannot be loaded an error is returned.

func ConfigureLogging

func ConfigureLogging()

func ConfigureTang

func ConfigureTang() error

func CustomHTTPErrorHandler

func CustomHTTPErrorHandler(err error, c echo.Context)

func DBLevel

func DBLevel() zerolog.Level

func DaysTillExpiration

func DaysTillExpiration(certs *tls.Certificate) (int, error)

DaysTillExpiration Finds the number of days until the specified certificate expired tls.Certificate allows for multiple certs to be combined, so this takes the expiration date that is coming the soonest

func DefaultLogwatchStream

func DefaultLogwatchStream() string

func EnvironmentPrefix

func EnvironmentPrefix(rhContentPath, rhDomainName, templateUUID string) (string, error)

EnvironmentPrefix create the prefix for the candlepin environment for a template

Red Hat content is appended to an environment prefix

for example "content/dist/rhel9/9.4/x86_64/appstream/os/"
would end up prefixed with  /api/pulp/content/$REDHAT_DOMAIN/templates/$TEMPLATE_UUID

func FeatureAccessible

func FeatureAccessible(ctx context.Context, feature Feature) bool

func FeatureServiceConfigured

func FeatureServiceConfigured() bool

func GetCertificate

func GetCertificate(certUser CertUser) (tls.Certificate, error)

func GetClowderExternalURL

func GetClowderExternalURL(clowdConfig *clowder.AppConfig, existingUrl string) string

func GetHTTPClient

func GetHTTPClient(certUser CertUser, configClientCerts bool) (http.Client, error)

func GetSaramaConfig

func GetSaramaConfig() (*sarama.Config, error)

func GetTransport

func GetTransport(certBytes, keyBytes, caCertBytes []byte, certUser CertUser, timeout time.Duration) (*http.Transport, error)

func KesselConfigured

func KesselConfigured() bool

func Load

func Load()

func MetricsLevel

func MetricsLevel() zerolog.Level

func ProgramString

func ProgramString() string

func PulpConfigured

func PulpConfigured() bool

func ReadCACert

func ReadCACert(certUser CertUser) ([]byte, error)

func ReadCert

func ReadCert(certUser CertUser) ([]byte, error)

func ReadKey

func ReadKey(certUser CertUser) ([]byte, error)

func RedisUrl

func RedisUrl() string

func RoadmapConfigured

func RoadmapConfigured() bool

func SetupCloudEventsKafkaClient

func SetupCloudEventsKafkaClient(topic string) (v2.Client, error)

SetupCloudEventsKafkaClient create the cloud event kafka client that will send event to the given kafka topic

func SetupNotifications

func SetupNotifications()

SetupNotifications creates the cloud event kafka client for sending event to the event service

func SetupTemplateEvents

func SetupTemplateEvents()

SetupTemplateEvents creates the cloud event kafka client for sending event to the patch service

func SkipLogging

func SkipLogging(c echo.Context) bool

func SnapshotInterval

func SnapshotInterval(redHat bool) string

func ValidArchLabel

func ValidArchLabel(label string) bool

ValidArchLabel Given a label, verifies that the label is a valid distribution architecture label

func ValidDistributionMinorVersionLabel

func ValidDistributionMinorVersionLabel(label string) bool

func ValidDistributionVersionLabels

func ValidDistributionVersionLabels(labels []string) (bool, string)

ValidDistributionVersionLabels Given a list of labels, return true if every item of the list is a valid distribution version. If at least one is not valid, returns false and the first invalid version

func ValidExtendedReleaseLabel

func ValidExtendedReleaseLabel(label string) bool

Types

type Candlepin

type Candlepin struct {
	Server     string
	Username   string
	Password   string
	ClientCert string `mapstructure:"client_cert"`
	ClientKey  string `mapstructure:"client_key"`
	CACert     string `mapstructure:"ca_cert"`
	DevelOrg   bool   `mapstructure:"devel_org"` // For use only in dev envs
}

type CandlepinCertUser

type CandlepinCertUser struct {
}

func (*CandlepinCertUser) CACert

func (c *CandlepinCertUser) CACert() string

func (*CandlepinCertUser) CACertPath

func (c *CandlepinCertUser) CACertPath() string

func (*CandlepinCertUser) ClientCert

func (c *CandlepinCertUser) ClientCert() string

func (*CandlepinCertUser) ClientCertPath

func (c *CandlepinCertUser) ClientCertPath() string

func (*CandlepinCertUser) ClientKey

func (c *CandlepinCertUser) ClientKey() string

func (*CandlepinCertUser) ClientKeyPath

func (c *CandlepinCertUser) ClientKeyPath() string

func (*CandlepinCertUser) Label

func (c *CandlepinCertUser) Label() string

func (*CandlepinCertUser) Proxy

func (c *CandlepinCertUser) Proxy() string

type CertUser

type CertUser interface {
	ClientCert() string
	ClientKey() string
	CACert() string
	ClientCertPath() string
	ClientKeyPath() string
	CACertPath() string
	Label() string
	Proxy() string
}

func CertUsers

func CertUsers() []CertUser

type Certs

type Certs struct {
	CertPath          string `mapstructure:"cert_path"`
	CdnCertPair       *tls.Certificate
	CdnCertPairString *string
}

type Clients

type Clients struct {
	RbacEnabled    bool           `mapstructure:"rbac_enabled"`
	RbacBaseUrl    string         `mapstructure:"rbac_base_url"`
	RbacTimeout    int            `mapstructure:"rbac_timeout"`
	Kessel         Kessel         `mapstructure:"kessel"`
	Pulp           Pulp           `mapstructure:"pulp"`
	Redis          Redis          `mapstructure:"redis"`
	Candlepin      Candlepin      `mapstructure:"candlepin"`
	FeatureService FeatureService `mapstructure:"feature_service"`
	PulpLogParser  PulpLogParser  `mapstructure:"pulp_log_parser"`
	Roadmap        Roadmap        `mapstructure:"roadmap"`
}

type Cloudwatch

type Cloudwatch struct {
	Region  string
	Key     string
	Secret  string
	Session string
	Group   string
	Stream  string
}

type Configuration

type Configuration struct {
	Database            Database
	Logging             Logging
	Loaded              bool
	Certs               Certs
	Options             Options
	Kafka               kafka.KafkaConfig
	Cloudwatch          Cloudwatch
	Metrics             Metrics
	Clients             Clients            `mapstructure:"clients"`
	Mocks               Mocks              `mapstructure:"mocks"`
	Sentry              Sentry             `mapstructure:"sentry"`
	NotificationsClient cloudevents.Client `mapstructure:"notification_client"`
	TemplateEventClient cloudevents.Client `mapstructure:"template_event_client"`
	Tasking             Tasking            `mapstructure:"tasking"`
	Features            FeatureSet         `mapstructure:"features"`
}
var LoadedConfig Configuration

func Get

func Get() *Configuration

type ContextRequestIDKey

type ContextRequestIDKey struct{}

Used in the context as the Key to store the Request ID type ContextRequestIDKey struct{}

type Database

type Database struct {
	Host              string
	Port              int
	User              string
	Password          string
	Name              string
	CACertPath        string        `mapstructure:"ca_cert_path"`
	PoolLimit         int           `mapstructure:"pool_limit"`
	SlowQueryDuration time.Duration `mapstructure:"slow_query_duration"`
}

type DistributionArch

type DistributionArch struct {
	Name  string `json:"name"`  // Human-readable form of the architecture
	Label string `json:"label"` // Static label of the architecture
}

type DistributionMinorVersion

type DistributionMinorVersion struct {
	Name                   string   `json:"name"`
	Label                  string   `json:"label"`
	Major                  string   `json:"major"`
	ExtendedReleaseStreams []string `json:"extended_release_streams"`
}

type DistributionVersion

type DistributionVersion struct {
	Name  string `json:"name"`  // Human-readable form of the version
	Label string `json:"label"` // Static label of the version
}

type Expiration

type Expiration struct {
	Rbac              time.Duration `mapstructure:"rbac"`
	PulpContentPath   time.Duration `mapstructure:"pulp_content_path"`
	SubscriptionCheck time.Duration `mapstructure:"subscription_check"`
	Roadmap           time.Duration `mapstructure:"roadmap"`
}

type Feature

type Feature struct {
	Enabled       bool
	Accounts      *[]string // Only allow access if in the accounts list
	Organizations *[]string // Or org id is in the list
	Users         *[]string // or username in the users list
}

type FeatureService

type FeatureService struct {
	Server         string
	ClientCert     string `mapstructure:"client_cert"`
	ClientKey      string `mapstructure:"client_key"`
	CACert         string `mapstructure:"ca_cert"`
	ClientCertPath string `mapstructure:"client_cert_path"`
	ClientKeyPath  string `mapstructure:"client_key_path"`
	CACertPath     string `mapstructure:"ca_cert_path"`
}

type FeatureServiceCertUser

type FeatureServiceCertUser struct {
}

func (*FeatureServiceCertUser) CACert

func (c *FeatureServiceCertUser) CACert() string

func (*FeatureServiceCertUser) CACertPath

func (c *FeatureServiceCertUser) CACertPath() string

func (*FeatureServiceCertUser) ClientCert

func (c *FeatureServiceCertUser) ClientCert() string

func (*FeatureServiceCertUser) ClientCertPath

func (c *FeatureServiceCertUser) ClientCertPath() string

func (*FeatureServiceCertUser) ClientKey

func (c *FeatureServiceCertUser) ClientKey() string

func (*FeatureServiceCertUser) ClientKeyPath

func (c *FeatureServiceCertUser) ClientKeyPath() string

func (*FeatureServiceCertUser) Label

func (c *FeatureServiceCertUser) Label() string

func (*FeatureServiceCertUser) Proxy

func (c *FeatureServiceCertUser) Proxy() string

type FeatureSet

type FeatureSet struct {
	Snapshots               Feature
	AdminTasks              Feature `mapstructure:"admin_tasks"`
	CommunityRepos          Feature `mapstructure:"community_repos"`
	Kessel                  Feature `mapstructure:"kessel"`
	AllowCustomEPELCreation Feature `mapstructure:"allow_custom_epel_creation"`
	ExtendedReleaseRepos    Feature `mapstructure:"extended_release_repos"`
}

type Kessel

type Kessel struct {
	Server  string        `mapstructure:"server"`
	Auth    KesselAuth    `mapstructure:"auth"`
	Timeout time.Duration `mapstructure:"timeout"`
}

type KesselAuth

type KesselAuth struct {
	Enabled      bool   `mapstructure:"enabled"`
	ClientID     string `mapstructure:"client_id"`
	ClientSecret string `mapstructure:"client_secret"`
	OIDCIssuer   string `mapstructure:"oidc_issuer"`
	GrpcInsecure bool   `mapstructure:"grpc_insecure"`
}

type Logging

type Logging struct {
	Level        string
	MetricsLevel string `mapstructure:"metrics_level"`
	DBLevel      string `mapstructure:"db_level"`
	Console      bool
	Color        bool `mapstructure:"color"`
}

type Metrics

type Metrics struct {
	// Defines the path to the metrics server that the app should be configured to
	// listen on for metric traffic.
	Path string `mapstructure:"path"`

	// Defines the metrics port that the app should be configured to listen on for
	// metric traffic.
	Port int `mapstructure:"port"`

	// How often (in seconds) to run queries to collect some metrics
	CollectionFrequency int `mapstructure:"collection_frequency"`
}

type MockKessel

type MockKessel struct {
	UserReadWrite     []string `mapstructure:"user_read_write"`
	UserRead          []string `mapstructure:"user_read"`
	UserNoPermissions []string `mapstructure:"user_no_permissions"`
}

type Mocks

type Mocks struct {
	Namespace string `mapstructure:"namespace"`
	Rbac      struct {
		UserReadWrite     []string `mapstructure:"user_read_write"`
		UserRead          []string `mapstructure:"user_read"`
		UserNoPermissions []string `mapstructure:"user_no_permissions"`
	} `mapstructure:"rbac"`
	Kessel MockKessel `mapstructure:"kessel"`
}

type ObjectStore

type ObjectStore struct {
	URL        string
	AccessKey  string `mapstructure:"access_key"`
	SecretKey  string `mapstructure:"secret_key"`
	Name       string
	Region     string
	FilePrefix string `mapstructure:"file_prefix"`
}

type Options

type Options struct {
	PagedRpmInsertsLimit      int `mapstructure:"paged_rpm_inserts_limit"`
	IntrospectApiTimeLimitSec int `mapstructure:"introspect_api_time_limit_sec"`
	// If true, introspection and snapshotting always runs for nightly job invocation, regardless of how soon they happened previously.  Used for testing.
	AlwaysRunCronTasks     bool   `mapstructure:"always_run_cron_tasks"`
	EnableNotifications    bool   `mapstructure:"enable_notifications"`
	TemplateEventTopic     string `mapstructure:"template_event_topic"`
	RepositoryImportFilter string `mapstructure:"repository_import_filter"` // Used by qe to control which repos are imported
	// url (https://servername) to access the api, used to reference gpg keys
	// Supports partial hostnames (i.e. http://.server.example.com).
	// If this is encountered (and clowder is used), it will prepend the envName from clowder
	ExternalURL             string   `mapstructure:"external_url"`
	SnapshotRetainDaysLimit int      `mapstructure:"snapshot_retain_days_limit"`
	FeatureFilter           []string `mapstructure:"feature_filter"` // Used to control which repos are imported based on feature name
	EntitleAll              bool     `mapstructure:"entitle_all"`    // Used in ephemeral to allow access to all layered repos
}

https://stackoverflow.com/questions/54844546/how-to-unmarshal-golang-viper-snake-case-values

type PopularRepository

type PopularRepository struct {
	UUID                 string   `json:"uuid"`                                // UUID of the repository if it exists for the user
	ExistingName         string   `json:"existing_name"`                       // Existing reference name for repository
	SuggestedName        string   `json:"suggested_name"`                      // Suggested name of the popular repository
	URL                  string   `json:"url"`                                 // URL of the remote yum repository
	DistributionVersions []string `json:"distribution_versions" example:"7,8"` // Versions to restrict client usage to
	DistributionArch     string   `json:"distribution_arch" example:"x86_64"`  // Architecture to restrict client usage to
	GpgKey               string   `json:"gpg_key"`                             // GPG key for repository
	MetadataVerification bool     `json:"metadata_verification"`               // Verify packages
}

Should match api.PopularRepositoryResponse

type Pulp

type Pulp struct {
	Server            string
	Username          string
	Password          string
	StorageType       string       `mapstructure:"storage_type"` // s3 or local
	CustomRepoObjects *ObjectStore `mapstructure:"custom_repo_objects"`
	DownloadPolicy    string       `mapstructure:"download_policy"`            // on_demand or immediate
	GuardSubjectDn    string       `mapstructure:"guard_subject_dn"`           // DN to allow access to via x509 identity subject_dn
	RepoContentGuards bool         `mapstructure:"custom_repo_content_guards"` // To turn on or off the creation of content guards for repos
	Database          Database     `mapstructure:"database"`                   // for use with tangy
	ClientCert        string       `mapstructure:"client_cert"`
	ClientKey         string       `mapstructure:"client_key"`
	CACert            string       `mapstructure:"ca_cert"`
	ClientCertPath    string       `mapstructure:"client_cert_path"`
	ClientKeyPath     string       `mapstructure:"client_key_path"`
	CACertPath        string       `mapstructure:"ca_cert_path"`
	ContentOrigin     string       `mapstructure:"content_origin"` // hostname of the location of pulp content
	Proxy             string       `mapstructure:"proxy"`
}

type PulpCertUser

type PulpCertUser struct{}

func (*PulpCertUser) CACert

func (c *PulpCertUser) CACert() string

func (*PulpCertUser) CACertPath

func (c *PulpCertUser) CACertPath() string

func (*PulpCertUser) ClientCert

func (c *PulpCertUser) ClientCert() string

func (*PulpCertUser) ClientCertPath

func (c *PulpCertUser) ClientCertPath() string

func (*PulpCertUser) ClientKey

func (c *PulpCertUser) ClientKey() string

func (*PulpCertUser) ClientKeyPath

func (c *PulpCertUser) ClientKeyPath() string

func (*PulpCertUser) Label

func (c *PulpCertUser) Label() string

func (*PulpCertUser) Proxy

func (c *PulpCertUser) Proxy() string

type PulpLogParser

type PulpLogParser struct {
	Cloudwatch Cloudwatch  `mapstructure:"cloudwatch"`
	S3         ObjectStore `mapstructure:"s3"`
}

type Redis

type Redis struct {
	Host       string
	Port       int
	Username   string
	Password   string
	DB         int
	Expiration Expiration `mapstructure:"expiration"`
}

type RequestIdHook

type RequestIdHook struct{}

func (RequestIdHook) Run

func (h RequestIdHook) Run(e *zerolog.Event, level zerolog.Level, msg string)

type Roadmap

type Roadmap struct {
	Server   string
	Username string
	Password string
	Proxy    string
}

type Sentry

type Sentry struct {
	Dsn string
}

type Tasking

type Tasking struct {
	PGXLogging          bool          `mapstructure:"pgx_logging"`
	Heartbeat           time.Duration `mapstructure:"heartbeat"`
	WorkerCount         int           `mapstructure:"worker_count"`
	RetryWaitUpperBound time.Duration `mapstructure:"retry_wait_upper_bound"`
	PoolLimit           int           `mapstructure:"pool_limit"`
}

Jump to

Keyboard shortcuts

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