test

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 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 Report

type Report struct {
	IsRunning                bool                       `json:"-"`
	NumRunningStateChanges   uint32                     `json:"-"`
	IsLive                   bool                       `json:"-"`
	NumLivenessStateChanges  uint32                     `json:"-"`
	NumLivenessSetTrue       uint32                     `json:"-"`
	NumLivenessSetFalse      uint32                     `json:"-"`
	IsReady                  bool                       `json:"-"`
	NumReadinessStateChanges uint32                     `json:"-"`
	NumReadinessSetTrue      uint32                     `json:"-"`
	NumReadinessSetFalse     uint32                     `json:"-"`
	NumHealthCheckUpdates    uint32                     `json:"-"`
	HealthChecks             map[string]*healthpb.Check `json:"-"`
}

Report is a snapshot of this reporter's state.

func (Report) MarshalJSON

func (r Report) MarshalJSON() ([]byte, error)

type Reporter

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

Reporter is a reporter used for testing.

func FromReporter

func FromReporter(r health.Reporter) (*Reporter, bool)

FromReporter is a convenience func for converting a health.Reporter implementation into a *Reporter instance.

func (*Reporter) Report

func (t *Reporter) Report() Report

Report returns a summary of the test reporter.

func (*Reporter) Run

func (t *Reporter) Run(_ context.Context) error

func (*Reporter) SetLiveness

func (t *Reporter) SetLiveness(_ context.Context, b bool)

func (*Reporter) SetReadiness

func (t *Reporter) SetReadiness(_ context.Context, b bool)

func (*Reporter) Stop

func (t *Reporter) Stop(_ context.Context) error

func (*Reporter) UpdateHealthChecks

func (t *Reporter) UpdateHealthChecks(_ context.Context, m map[string]*healthpb.Check)

Jump to

Keyboard shortcuts

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