feat: Add ResetCircuitBreaker helper
This commit is contained in:
@@ -9,12 +9,24 @@ type Edge struct {
|
||||
Kind EdgeKind
|
||||
Duration int // travel time in seconds
|
||||
Transport string // transport type (train, plane, bus)
|
||||
TransportType string // deprecated: use Transport instead
|
||||
TransportType TransportType // transport type enum
|
||||
IsTransfer bool // whether this edge involves a transfer
|
||||
Departure string // ISO 8601 departure time
|
||||
Arrival string // ISO 8601 arrival time
|
||||
}
|
||||
|
||||
// TransportType represents the type of transport for an edge.
|
||||
type TransportType string
|
||||
|
||||
const (
|
||||
// TransportTypePlane represents airplane transport.
|
||||
TransportTypePlane TransportType = "plane"
|
||||
// TransportTypeTrain represents train transport.
|
||||
TransportTypeTrain TransportType = "train"
|
||||
// TransportTypeBus represents bus transport.
|
||||
TransportTypeBus TransportType = "bus"
|
||||
)
|
||||
|
||||
// NodeType represents the type of a graph node.
|
||||
type NodeType int
|
||||
|
||||
@@ -129,6 +141,7 @@ func BuildGraphFromStations(stations []StationInfo) *Graph {
|
||||
Kind: EdgeKindSynthetic,
|
||||
Duration: 300, // 5 min synthetic transfer
|
||||
Transport: "train",
|
||||
TransportType: TransportTypeTrain,
|
||||
IsTransfer: true,
|
||||
})
|
||||
|
||||
@@ -139,6 +152,7 @@ func BuildGraphFromStations(stations []StationInfo) *Graph {
|
||||
Kind: EdgeKindSynthetic,
|
||||
Duration: 300, // 5 min synthetic transfer
|
||||
Transport: "train",
|
||||
TransportType: TransportTypeTrain,
|
||||
IsTransfer: true,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user