discoveryinfo

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

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

Info keeps track of the discovery service and its health.

func New

func New(key string, addr *addr.AppAddr) *Info

New creates a new info with the specified key and address.

func (*Info) Addr

func (h *Info) Addr() *addr.AppAddr

Addr returns the address of the discovery service instance.

func (*Info) Fail

func (h *Info) Fail()

Fail adds to the fail count.

func (*Info) FailCount

func (h *Info) FailCount() int

FailCount returns the fail count.

func (*Info) Key

func (h *Info) Key() string

Key returns the info key.

func (*Info) String

func (h *Info) String() string

func (*Info) Update

func (h *Info) Update(a *addr.AppAddr)

Update updates the address. If changed, the fail count is reset.

Jump to

Keyboard shortcuts

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