consul

package
v0.0.0-...-0e5f22e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulDiscoveryService

type ConsulDiscoveryService struct {
	ListUpdatedChans map[string]chan []taskhandler.ServingService
	ServiceName      string
	ServiceID        string
	ConsulClient     *api.Client

	HealthCheckFun func() (bool, error)
	// contains filtered or unexported fields
}

func NewDiscoveryService

func NewDiscoveryService(healthCheck func() (bool, error)) (*ConsulDiscoveryService, error)

func (*ConsulDiscoveryService) AddNodeListUpdated

func (consul *ConsulDiscoveryService) AddNodeListUpdated(key string, sub chan []taskhandler.ServingService)

func (*ConsulDiscoveryService) RegisterService

func (consul *ConsulDiscoveryService) RegisterService() error

func (*ConsulDiscoveryService) RemoveNodeListUpdated

func (consul *ConsulDiscoveryService) RemoveNodeListUpdated(key string)

func (*ConsulDiscoveryService) UnregisterService

func (consul *ConsulDiscoveryService) UnregisterService() error

Jump to

Keyboard shortcuts

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