consul

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(cfg Config) error

Types

type Config

type Config struct {
	Address      string       `yaml:"address"`
	ServiceExtra ServiceExtra `yaml:"service_extra"`
}

type Probe

type Probe struct {
	HealthCheck string `yaml:"health_check"`
	Timeout     string `default:"30s" yaml:"timeout"`
	Interval    string `default:"10s" yaml:"interval"`
}

type ServiceExtra

type ServiceExtra struct {
	ServiceID  string   `default:"unknown" yaml:"service_id"`
	Name       string   `default:"unknown" yaml:"name"`
	ExposePort int      `default:"8000" yaml:"expose_port"`
	Address    string   `yaml:"address"`
	Tags       []string `yaml:"tags"`
	Probe      Probe    `yaml:"probe"`
}

Jump to

Keyboard shortcuts

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