config

package
v0.0.0-...-742acb9 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachePattern

type CachePattern struct {
	Path         string
	ReplaceRules []struct {
		Match        int
		Replacements []struct {
			Replacement     string
			LanguageMatches []string
			Default         bool
		}
	}
	Purge bool
}

type Config

type Config struct {
	ListenAddr          string
	UpstreamURL         string
	CookieToBypassCache []string

	Storage struct {
		S3Endpoint        string
		S3Region          string
		S3AccessKeyID     string
		S3SecretAccessKey string
		S3Bucket          string
	}

	Queue struct {
		KafkaBrokers       []string
		KafkaConsumerGroup string
		KafkaTopic         string
		KafkaUpdateTopic   string
	}

	Redis struct {
		Addr     string
		Password string
		DB       int
	}

	CachePatterns []CachePattern
}

func LoadConfig

func LoadConfig() (*Config, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳