mock

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Mock Provider

The Mock Provider extends the platform-health server to support internal testing.

Configuration

  • name (required): The name of the Mock service instance, used to identify the service in the health reports.
  • health (default: HEALTHY): The health state of the Mock service.
  • sleep (default: 1ns): The delay in returning Mock service status.

Documentation

Index

Constants

View Source
const TypeMock = "mock"

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	Name   string        `mapstructure:"name"`
	Health ph.Status     `mapstructure:"health" default:"1"`
	Sleep  time.Duration `mapstructure:"sleep" default:"1ns"`
}

func (*Mock) GetHealth

func (i *Mock) GetHealth(ctx context.Context) *ph.HealthCheckResponse

func (*Mock) GetName

func (i *Mock) GetName() string

func (*Mock) GetType

func (i *Mock) GetType() string

func (*Mock) SetDefaults

func (i *Mock) SetDefaults()

Jump to

Keyboard shortcuts

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