test

package
v0.0.0-...-b85187d Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HappyHealthChecker

func HappyHealthChecker(nodes []types.NodeName) checker.HealthChecker

creates an implementation of checker.HealthChecker that always reports satisfied health checks for testing purposes

func NewSingleService

func NewSingleService(service string, health map[types.NodeName]health.Result) checker.HealthChecker

NewSingleService reports a fixed health result for a single service only

func NewSingleServiceShadow

func NewSingleServiceShadow(service string, health map[types.NodeName]health.Result) checker.ShadowTrafficHealthChecker

Types

type AlwaysHappyHealthChecker

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

func (AlwaysHappyHealthChecker) Service

func (h AlwaysHappyHealthChecker) Service(serviceID string) (map[types.NodeName]health.Result, error)

func (AlwaysHappyHealthChecker) WatchHealth

func (h AlwaysHappyHealthChecker) WatchHealth(
	_ chan []*health.Result,
	errCh chan<- error,
	quitCh <-chan struct{},
	jitterWindow time.Duration,
)

func (AlwaysHappyHealthChecker) WatchPodOnNode

func (h AlwaysHappyHealthChecker) WatchPodOnNode(
	nodeName types.NodeName,
	podID types.PodID,
	quitCh <-chan struct{},
) (chan health.Result, chan error)

func (AlwaysHappyHealthChecker) WatchService

func (h AlwaysHappyHealthChecker) WatchService(
	ctx context.Context,
	serviceID string,
	resultCh chan<- map[types.NodeName]health.Result,
	errCh chan<- error,
	watchDelay time.Duration,
)

Jump to

Keyboard shortcuts

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