config

package
v0.0.0-...-e7a82c9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Body pipeline.ParaKey = "body"
View Source
const BuildDate = "N/A"
View Source
const InactiveUpstream = "inactive_upstream"

Bucket

View Source
const LastCommitLog = "N/A"
View Source
const Message pipeline.ParaKey = "message"
View Source
const Method pipeline.ParaKey = "method"
View Source
const Response pipeline.ParaKey = "response"
View Source
const ResponseSize pipeline.ParaKey = "response_size"
View Source
const ResponseStatusCode pipeline.ParaKey = "response_code"
View Source
const Upstream pipeline.ParaKey = "upstream"
View Source
const Url pipeline.ParaKey = "url"
View Source
const Version = "0.0.1-SNAPSHOT"

Variables

This section is empty.

Functions

func GetUpstreamConfigs

func GetUpstreamConfigs() map[string]UpstreamConfig

func SetProxyConfig

func SetProxyConfig(cfg ProxyConfig)

func SetUpstream

func SetUpstream(ups []UpstreamConfig)

func UpdateUpstreamReadableStatus

func UpdateUpstreamReadableStatus(key string, active bool)

func UpdateUpstreamWriteableStatus

func UpdateUpstreamWriteableStatus(key string, active bool)

Types

type ProxyConfig

type ProxyConfig struct {
	UIEnabled           bool             `config:"ui_enabled"`
	Upstream            []UpstreamConfig `config:"upstream"`
	Algorithm           string           `config:"algorithm"`
	PassthroughPatterns []string         `config:"pass_through"`
}

func GetProxyConfig

func GetProxyConfig() ProxyConfig

type UpstreamConfig

type UpstreamConfig struct {
	Name          string `config:"name"`
	QueueName     string `config:"queue_name"`
	MaxQueueDepth int64  `config:"max_queue_depth"`
	Enabled       bool   `config:"enabled"`
	Writeable     bool   `config:"writeable"`
	Readable      bool   `config:"readable"`
	Timeout       string `config:"timeout"`
	Elasticsearch string `config:"elasticsearch"`
}

func GetUpstreamConfig

func GetUpstreamConfig(key string) UpstreamConfig

func (*UpstreamConfig) SafeGetQueueName

func (v *UpstreamConfig) SafeGetQueueName() string

Jump to

Keyboard shortcuts

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