consul

package
v0.0.0-...-f4dd3ec Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consul

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

func NewConsul

func NewConsul(consulURL, name, address string, grpcPort int, logger *zap.Logger, options ...Option) (*Consul, error)

func (*Consul) Consul

func (c *Consul) Consul() *api.Client

func (*Consul) RegisterService

func (c *Consul) RegisterService() error

func (*Consul) Stop

func (c *Consul) Stop() error

func (*Consul) WatchService

func (c *Consul) WatchService(serviceAddr string) <-chan []*api.ServiceEntry

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithCheckDeregisterTimeout

func WithCheckDeregisterTimeout(timeout string) Option

func WithCheckInterval

func WithCheckInterval(interval string) Option

func WithCheckTLL

func WithCheckTLL(timeout string) Option

func WithCheckTimeout

func WithCheckTimeout(timeout string) Option

func WithSelfCheckTimeout

func WithSelfCheckTimeout(timeout time.Duration) Option

func WithServiceCheck

func WithServiceCheck(addr string, port int) Option

func WithTag

func WithTag(tag string) Option

type Plan

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

func NewPlan

func NewPlan(consulURL string, serviceName string, input chan<- []*api.ServiceEntry) *Plan

func (*Plan) Run

func (p *Plan) Run(errCh chan<- error)

func (*Plan) Stop

func (p *Plan) Stop()

type ServiceConfig

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

Jump to

Keyboard shortcuts

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