discovery

package
v0.0.0-...-2b4093a Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceDiscovery

type ServiceDiscovery struct {
	Enabled       bool
	Type          string
	Cluster       string
	Prefix        string
	CertFile      string
	KeyFile       string
	TrustedCAFile string
}

ServiceDiscovery provides meta data describling a discovery config.

func New

New returns a ServiceDiscovery object.

func (*ServiceDiscovery) Run

func (sd *ServiceDiscovery) Run(balancer *balancer.Balancer)

Run starts the ServiceDiscovery service.

type ServiceDiscoveryOption

type ServiceDiscoveryOption func(*ServiceDiscovery) error

ServiceDiscoveryOption provides option setter for ServiceDiscovery.

func ClusterOpt

func ClusterOpt(c string) ServiceDiscoveryOption

ClusterOpt return a function to set ServiceDiscovery cluster address.

func PrefixOpt

func PrefixOpt(p string) ServiceDiscoveryOption

PrefixOpt return a function to set key prefix.

func SecurityOpt

func SecurityOpt(certFile, keyFile, trustedCAFile string) ServiceDiscoveryOption

SecurityOpt return a function to set tls config.

func TypeOpt

func TypeOpt(t string) ServiceDiscoveryOption

TypeOpt return a function to set ServiceDiscovery type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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