static

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAnonymous

func CreateAnonymous(conf *Config) discovery.IDiscovery

func NewFactory

func NewFactory() eosc.IExtenderDriverFactory

NewFactory 创建静态服务发现的驱动工厂

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册静态服务发现的驱动工厂

Types

type Config

type Config struct {
	Scheme   string        `json:"scheme" enum:"HTTP,HTTPS" label:"请求协议"`
	HealthOn bool          `json:"health_on" label:"是否开启健康检查"`
	Health   *HealthConfig `json:"health" label:"健康检查配置" switch:"health_on===true"`
}

Config 静态服务发现配置

type HealthConfig

type HealthConfig struct {
	Scheme      string `json:"scheme" enum:"HTTP,HTTPS" label:"请求协议"`
	Method      string `json:"method" enum:"GET,POST,PUT" label:"请求方式"`
	URL         string `json:"url" label:"请求URL"`
	SuccessCode int    `json:"success_code" label:"成功状态码" minimum:"100" description:"最小值:100"`
	Period      int    `json:"period" label:"检查频率" minimum:"1" default:"30" description:"单位:s,最小值:1"`
	Timeout     int    `json:"timeout" label:"超时时间" label:"单位:ms"`
}

HealthConfig 健康检查配置

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node 静态服务发现的节点类型

Jump to

Keyboard shortcuts

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