config

package
v1.18.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPolarisName default polaris name
	DefaultPolarisName = "polaris-server"
	// DefaultPolarisNamespace default namespace
	DefaultPolarisNamespace = "Polaris"
	// DefaultFilePath default file path
	DefaultFilePath = "polaris-server.yaml"
	// DefaultHeartbeatInterval default interval second for heartbeat
	DefaultHeartbeatInterval = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIEntries

type APIEntries struct {
	Name      string   `yaml:"name"`
	Protocols []string `yaml:"protocols"`
}

APIEntries 对外提供的apiServers

type Bootstrap

type Bootstrap struct {
	Logger         map[string]*log.Options
	StartInOrder   map[string]interface{} `yaml:"startInOrder"`
	PolarisService PolarisService         `yaml:"polaris_service"`
}

Bootstrap 启动引导配置

type Config

type Config struct {
	Bootstrap    Bootstrap          `yaml:"bootstrap"`
	APIServers   []apiserver.Config `yaml:"apiservers"`
	Cache        cache.Config       `yaml:"cache"`
	Namespace    namespace.Config   `yaml:"namespace"`
	Naming       service.Config     `yaml:"naming"`
	Config       config.Config      `yaml:"config"`
	HealthChecks healthcheck.Config `yaml:"healthcheck"`
	Maintain     admin.Config       `yaml:"maintain"`
	Store        store.Config       `yaml:"store"`
	Auth         auth.Config        `yaml:"auth"`
	Plugin       plugin.Config      `yaml:"plugin"`
}

Config 配置

func Load

func Load(filePath string) (*Config, error)

Load 加载配置

type PolarisService

type PolarisService struct {
	EnableRegister    bool       `yaml:"enable_register"`
	ProbeAddress      string     `yaml:"probe_address"`
	SelfAddress       string     `yaml:"self_address"`
	NetworkInter      string     `yaml:"network_inter"`
	Isolated          bool       `yaml:"isolated"`
	DisableHeartbeat  bool       `yaml:"disable_heartbeat"`
	HeartbeatInterval int        `yaml:"heartbeat_interval"`
	Services          []*Service `yaml:"services"`
}

PolarisService polaris-server的自注册配置

type Service

type Service struct {
	Name      string            `yaml:"name"`
	Namespace string            `yaml:"namespace"`
	Protocols []string          `yaml:"protocols"`
	Metadata  map[string]string `yaml:"metadata"`
}

Service 服务的自注册的配置

Jump to

Keyboard shortcuts

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