func MustNewKeyedErrorHealthCheckSource(checkType health.CheckType, errorMode ErrorMode, options ...ErrorOption) KeyedErrorHealthCheckSource {
	source, err := NewKeyedErrorHealthCheckSource(checkType, errorMode, options...)
	if err != nil {
		panic(err)
	}
	return source
}
MustNewKeyedErrorHealthCheckSource creates a new KeyedErrorHealthCheckSource which will panic if any error is encountered.
Should only be used in instances where the inputs are statically defined and known to be valid.
package window
import (
	"context"
	"sync"
	"time"
	werror "github.com/palantir/witchcraft-go-error"
	"github.com/palantir/witchcraft-go-health/conjure/witchcraft/api/health"
	"github.com/palantir/witchcraft-go-health/sources"
	"github.com/palantir/witchcraft-go-health/status"
)
type KeyedErrorSubmitter interface {
	Submit(key string, err error)
}
type KeyedErrorHealthCheckSource interface {
	KeyedErrorSubmitter
	status.HealthCheckSource
}
type keyedErrorHealthCheckSource struct {
	errorMode               ErrorMode
	windowSize              time.Duration
	errorStore              TimedKeyStore
	successStore            TimedKeyStore
	gapEndTimeStore         TimedKeyStore
	repairingGracePeriod    time.Duration
	maxErrorAge             time.Duration
	globalRepairingDeadline time.Time
	sourceMutex             sync.Mutex
	checkType               health.CheckType
	checkMessage            string
	timeProvider            TimeProvider
	healthState             health.HealthState_Value
}