consul

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Connection config type to be passed.
	Connection ConnectionConfig

	// ConfigType config type to be passed.
	ConfigType string

	// Interval to run update periodically
	// default 0, it will not run periodically background process to update
	Interval time.Duration
}

Config mandatory to be passed on initialization.

func (*Config) GetConsulRemote

func (c *Config) GetConsulRemote() string

GetConsulRemote function to get consul remote host.

func (*Config) SetConsulRemote

func (c *Config) SetConsulRemote()

SetConsulRemote function to set consul remote host token.

type ConnectionConfig

type ConnectionConfig struct {
	// Host config to set consul host.
	Host string

	// Port config to set consul port.
	Port int

	// Token config to set consul http token.
	Token string

	// Key consul key path to be read.
	Key string
}

ConnectionConfig mandatory contains consul connection settings.

type Reader

type Reader interface {
	Read(data interface{}) error
}

Reader interface to read consul settings.

Jump to

Keyboard shortcuts

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