config

package
v0.0.0-...-7de8413 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Services []domain.Service `yaml:"services"`

	// TODO(chermehdi): remove this.
	// Name of the strategy to be used in load balancing between instances
	Strategy string `yaml:"strategy"`
}

Config is a representation of the configuration given to farely from a config source.

func LoadConfig

func LoadConfig(reader io.Reader) (*Config, error)

type ServerList

type ServerList struct {
	// Servers are the replicas
	Servers []*domain.Server

	// Name of the service
	Name string

	// Strategy defines how the server list is load balanced.
	// It can never be 'nil', it should always default to a 'RoundRobin' version.
	Strategy strategy.BalancingStrategy

	// Health checker for the servers
	Hc *health.HealthChecker
}

Jump to

Keyboard shortcuts

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