servicecenter

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(ctx context.Context, method, addr string, headers http.Header, body []byte) (resp *http.Response, err error)

func Start

func Start(ctx context.Context, conf *Config) (err error)

func Stop

func Stop(ctx context.Context) error

Types

type Config

type Config struct {
	Service  *MicroService `yaml:"service"`
	Registry *Registry     `yaml:"registry"`
	Provider *MicroService `yaml:"provider"`
	Tenant   *Tenant       `yaml:"tenant"`
}

Config of servicecenter

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Verify

func (c *Config) Verify() error

Verify Provide config verification

type Instance

type Instance struct {
	ID            string `yaml:"-"`
	Hostname      string `yaml:"hostname"`
	Protocol      string `yaml:"protocol"`
	ListenAddress string `yaml:"listenAddress"`
}

Instance configuration

type MicroService

type MicroService struct {
	ID       string    `yaml:"-"`
	AppID    string    `yaml:"appId"`
	Name     string    `yaml:"name"`
	Version  string    `yaml:"version"`
	Instance *Instance `yaml:"instance"`
}

MicroService configuration

type Registry

type Registry struct {
	Address   string   `yaml:"address"`
	Endpoints []string `yaml:"-"`
}

Registry configuration

type Tenant

type Tenant struct {
	Domain  string `yaml:"domain"`
	Project string `yaml:"project"`
}

Tenant configuration

Jump to

Keyboard shortcuts

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