consul

package
v0.0.0-...-7d9ee97 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package consul implements consul connection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consul

type Consul struct {
	// Client is the client to use for sending commands to consul.
	Client *api.Client

	// Address is the address of consul
	Address string

	// Folder is the folder name of kv config in consul.
	Folder string

	// Service is the name to be registered in consul.
	Service string
}

Consul _.

func New

func New(address, folder, service string) (*Consul, error)

New _.

func (*Consul) Deregister

func (c *Consul) Deregister(serviceID string) error

Deregister ._

func (*Consul) Kv

func (c *Consul) Kv(cfg interface{}) error

Kv _.

func (*Consul) Register

func (c *Consul) Register(listenAddress, listenPort, checkApi, interval, timeout string,
	tags []string, swagger bool) (string, error)

Register -.

Jump to

Keyboard shortcuts

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