configure

package
v0.0.0-...-9fc37f3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configure

type Configure struct {
	Project Project `json:"project" yaml:"project"`
}

type Project

type Project struct {
	Logger     logger.LogConfig     `json:"logger" yaml:"logger"`
	Registries map[string]*Registry `json:"registries" yaml:"registries"`
	Services   map[string]*Service  `json:"services" yaml:"services"`
}

type Registry

type Registry struct {
	Name string               `json:"name" yaml:"name"`
	Type service.RegisterType `json:"type" yaml:"type"`

	Endpoints []string      `json:"endpoint" yaml:"endpoint"`
	Secure    bool          `json:"secure" yaml:"secure"`
	Timeout   time.Duration `json:"timeout" yaml:"timeout"`

	ServerAddr string `json:"server_addr" yaml:"server_addr"`
	RetryTimes uint32 `json:"retry_times" yaml:"retry_times"`

	Watchers []Watcher `json:"watchers" yaml:"watchers"`
}

Registry registry

type Service

type Service struct {
	service.Service `json:",inline" yaml:",inline"`

	Options config.Options `json:"options" yaml:"options"`

	Registry *ServiceRegistry `json:"registry" yaml:"registry"`
}

Service service

type ServiceRegistry

type ServiceRegistry struct {
	// registry name
	Name string `json:"name" yaml:"name"`
	// node weight
	Weight uint32 `json:"weight" yaml:"weight"`
	// protocol between two servers
	Protocol service.Protocol `json:"protocol" yaml:"protocol"`

	TTL       time.Duration `json:"ttl" yaml:"ttl"`
	Heartbeat time.Duration `json:"heartbeat" yaml:"heartbeat"`
}

ServiceRegistry service's registry infor

type Watcher

type Watcher struct {
	service.Service `json:",inline" yaml:",inline"`

	Options config.Options `json:"options" yaml:"options"`
}

Jump to

Keyboard shortcuts

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