-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstatevent.go
More file actions
29 lines (24 loc) · 751 Bytes
/
Copy pathstatevent.go
File metadata and controls
29 lines (24 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2026 Onur Cinar.
// The source code is provided under MIT License.
// https://github.com/cinar/resile
package resile
import (
"time"
)
// HealthState represents the health state of a resilience component.
type HealthState int
const (
// HealthStateHealthy represents a healthy state where requests are allowed.
HealthStateHealthy HealthState = iota
// HealthStateDegraded represents a degraded but functional state.
HealthStateDegraded
// HealthStateUnhealthy represents an unhealthy state (e.g., circuit open).
HealthStateUnhealthy
)
// StateEvent represents a state change event emitted by resilience components.
type StateEvent struct {
Component string
State HealthState
Timestamp time.Time
Message string
}