mock

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notify

type Notify struct {

	// A guard to protect an access to the internal attributes
	// of the notification mock in order to prevent panics
	// raised by the race conditions detector.
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewNotify

func NewNotify() *Notify

func NewNotifyChan added in v0.9.0

func NewNotifyChan() (*Notify, chan int)

func (*Notify) AddServiceID added in v1.8.0

func (c *Notify) AddServiceID(serviceID structs.ServiceID)

AddServiceID will mock a service being present locally

func (*Notify) Output

func (m *Notify) Output(id structs.CheckID) string

Output returns an output string of the specified health-check.

func (*Notify) OutputMap

func (m *Notify) OutputMap() string

func (*Notify) ServiceExists added in v1.8.0

func (c *Notify) ServiceExists(serviceID structs.ServiceID) bool

ServiceExists mock

func (*Notify) State

func (m *Notify) State(id structs.CheckID) string

State returns the state of the specified health-check.

func (*Notify) StateMap

func (m *Notify) StateMap() string

func (*Notify) UpdateCheck

func (m *Notify) UpdateCheck(id structs.CheckID, status, output string)

func (*Notify) Updates

func (m *Notify) Updates(id structs.CheckID) int

Updates returns the count of updates of the specified health-check.

func (*Notify) UpdatesMap

func (m *Notify) UpdatesMap() string

Jump to

Keyboard shortcuts

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