bootstrap

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHeaderContextWithReqId

func CreateHeaderContextWithReqId(timeout time.Duration, reqID string) (context.Context, context.CancelFunc)

CreateHeaderContextWithReqId 创建传输grpc头的valueContext

func GetLocalHost

func GetLocalHost(probeAddr string) (string, error)

GetLocalHost 获取本地IP地址

func NonBlockingStart

func NonBlockingStart(configPath string, restart bool) ([]apiserver.APIServer, chan error, context.CancelFunc)

NonBlockingStart 非阻塞启动

func Start

func Start(configPath string, restart bool)

Start Server启动入口 引导启动阶段,遇到错误,直接退出

Types

type Config

type Config struct {
	Logger     log.Options
	Registry   Registry           `yaml:"registry"`
	APIServers []apiserver.Config `yaml:"api-servers"`
	Limit      config.Config      `yaml:"limit"`
	Plugin     plugin.Config      `yaml:"plugin"`
}

Config 配置类

type Registry

type Registry struct {
	Enable               bool   `yaml:"enable"`
	PolarisServerAddress string `yaml:"polaris-server-address"`
	Name                 string `yaml:"name"`
	Namespace            string `yaml:"namespace"`
	Host                 string `yaml:"host"`
	Token                string `yaml:"token"`
	HealthCheckEnable    bool   `yaml:"health-check-enable"`
}

Registry 自注册配置

Jump to

Keyboard shortcuts

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