register

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnsupportedErr = errors.New("unsupported this protocol")
)

Functions

This section is empty.

Types

type EtcdRegister

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

func NewEtcdRegister

func NewEtcdRegister(endpoints []string) (*EtcdRegister, error)

func (*EtcdRegister) Close

func (e *EtcdRegister) Close() error

func (*EtcdRegister) Register

func (e *EtcdRegister) Register(reader io.Reader) error

type HealthCheck

type HealthCheck struct {
	Method   string `mapstructure:"method"`
	Path     string `mapstructure:"path"`
	Port     int    `mapstructure:"port"`
	Interval string `mapstructure:"interval"`
	Timeout  string `mapstructure:"timeout"`
	Status   int    `mapstructure:"status"`
}

type Register

type Register interface {
	io.Closer
	Register(reader io.Reader) error
}

type Route

type Route struct {
	Name        string   `mapstructure:"name"`
	Rule        string   `mapstructure:"rule"`
	EntryPoints []string `mapstructure:"entry-points"`
	Priority    int64    `mapstructure:"priority"`
	Middlewares []string `mapstructure:"middlewares"`
}

type Service

type Service struct {
	Name        string      `mapstructure:"name"`
	Protocol    string      `mapstructure:"protocol"`
	Url         string      `mapstructure:"url"`
	HealthCheck HealthCheck `mapstructure:"healthcheck"`
	Routes      []Route     `mapstructure:"routes"`
}

Jump to

Keyboard shortcuts

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