dynamic

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package dynamic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceNode

type BalanceNode struct {
	Add      bool              `json:"add"`
	Scheme   string            `json:"scheme,default=http"`
	Host     string            `json:"host" binding:"required"`
	Metadata map[string]string `json:"metadata"`
	Weight   float64           `json:"weight,default=1.0"`
}

type Config

type Config struct {
	Switcher *Switch    `json:"switcher"`
	Limit    *RateLimit `json:"limit"`
}

type RateLimit

type RateLimit struct {
	Every time.Duration
	Burst int
	Mode  int
}

type Switch

type Switch struct {
	ServiceName string      `json:"service_name" binding:"required"`
	Add         bool        `json:"add"`
	Node        BalanceNode `json:"node" binding:"required"`
}

Jump to

Keyboard shortcuts

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