cluster

package
v0.0.0-...-3bbbf02 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deregister

func Deregister(node *Node) error

func Init

func Init(service string)

func Register

func Register(node *Node, ttl int) error

func WatchClusterConfig

func WatchClusterConfig() error

Types

type Config

type Config struct {
	LogLevel  string `json:"logLevel"`
	RateLimit struct {
		Middle int `json:"middle"`
		Low    int `json:"low"`
	} `json:"rateLimit"`
	CircuitBreaker struct {
		Cpu     int `json:"cpu"`
		Latency int `json:"latency"`
	} `json:"circuitBreaker"`
}

func GetClusterConfig

func GetClusterConfig() Config

type Node

type Node struct {
	Addr    string `json:"addr"`
	Version string `json:"version"`
	Proto   string `json:"proto"`
}

func Discover

func Discover() (output []*Node, err error)

Jump to

Keyboard shortcuts

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