checker

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthChecker

type HealthChecker interface {
	WatchPodOnNode(
		nodename types.NodeName,
		podID types.PodID,
		quitCh <-chan struct{},
	) (chan health.Result, chan error)
	WatchService(
		ctx context.Context,
		serviceID string,
		resultCh chan<- map[types.NodeName]health.Result,
		errCh chan<- error,
		watchDelay time.Duration,
	)
	WatchHealth(
		resultCh chan []*health.Result,
		errCh chan<- error,
		quitCh <-chan struct{},
		jitterWindow time.Duration,
	)
	Service(serviceID string) (map[types.NodeName]health.Result, error)
}

func NewHealthChecker

func NewHealthChecker(cClient consulutil.ConsulClient) HealthChecker

type HealthClient

type HealthClient interface {
	HealthCheckEndpoints(ctx context.Context, req *hclient.HealthEndpointsRequest) (map[string]health.HealthState, error)
	HealthMonitor(ctx context.Context, req *hclient.HealthRequest, respCh chan *hclient.HealthResponse) error
	HealthMonitorEndpoints(ctx context.Context, req *hclient.HealthEndpointsRequest, respCh chan *hclient.HealthResponse) error
}

type LabelReader

type LabelReader interface {
	GetMatches(klabels.Selector, labels.Type) ([]labels.Labeled, error)
}

type ReplicationControllerStore

type ReplicationControllerStore interface {
	Get(id rcfields.ID) (rcfields.RC, error)
}

type ResourceClient

type ResourceClient interface {
	GetRCIDsForPod(pod types.PodID) ([]rcfields.ID, error)
}

type ShadowTrafficHealthChecker

type ShadowTrafficHealthChecker interface {
	WatchService(
		ctx context.Context,
		serviceID string,
		resultCh chan<- map[types.NodeName]health.Result,
		errCh chan<- error,
		watchDelay time.Duration,
		useHealthService bool,
		useOnlyHealthService bool,
		status manifest.StatusStanza,
	)
	Service(
		serviceID string,
		useHealthService bool,
		status manifest.StatusStanza,
	) (map[types.NodeName]health.Result, error)
}

func NewShadowTrafficHealthChecker

func NewShadowTrafficHealthChecker(hClient HealthClient, resourceClient ResourceClient, cClient consulutil.ConsulClient, rcStore ReplicationControllerStore, labelReader LabelReader, useHealthService bool) ShadowTrafficHealthChecker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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