bootstrap

package
v0.0.0-...-96f2668 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApolloConfigSource

func NewApolloConfigSource(_, _ string) config.Source

NewApolloConfigSource 创建一个远程配置源 - Apollo

func NewConfigProvider

func NewConfigProvider(configType, configHost, configPath, configKey string) config.Config

NewConfigProvider 创建一个配置

func NewConsulConfigSource

func NewConsulConfigSource(configHost, configKey string) config.Source

NewConsulConfigSource 创建一个远程配置源 - Consul

func NewEtcdConfigSource

func NewEtcdConfigSource(configHost, configKey string) config.Source

NewEtcdConfigSource 创建一个远程配置源 - Etcd

func NewFileConfigSource

func NewFileConfigSource(filePath string) config.Source

NewFileConfigSource 创建一个本地文件配置源

func NewLoggerProvider

func NewLoggerProvider(serviceInfo *ServiceInfo) log.Logger

func NewNacosConfigSource

func NewNacosConfigSource(configAddr string, configPort uint64, configKey string) config.Source

NewNacosConfigSource 创建一个远程配置源 - Nacos

func NewRemoteConfigSource

func NewRemoteConfigSource(configType, configHost, configKey string) config.Source

NewRemoteConfigSource 创建一个远程配置源

func NewTracerProvider

func NewTracerProvider(endpoint, env string, serviceInfo *ServiceInfo) error

Types

type CommandFlags

type CommandFlags struct {
	Conf       string
	Env        string
	ConfigHost string
	ConfigType string
}

func NewCommandFlags

func NewCommandFlags() *CommandFlags

func (*CommandFlags) Init

func (f *CommandFlags) Init()

type ServiceInfo

type ServiceInfo struct {
	Name     string
	Version  string
	Id       string
	Metadata map[string]string
}

func NewServiceInfo

func NewServiceInfo(name, version, id string) ServiceInfo

func (*ServiceInfo) GetInstanceId

func (s *ServiceInfo) GetInstanceId() string

func (*ServiceInfo) SetMataData

func (s *ServiceInfo) SetMataData(k, v string)

Jump to

Keyboard shortcuts

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