Add LastRequestTime method and LRU eviction logic for instance management

This commit is contained in:
2025-08-30 23:59:37 +02:00
parent 4581d67165
commit c1fa0faf4b
3 changed files with 35 additions and 0 deletions

View File

@@ -144,6 +144,10 @@ func (i *Process) Stop() error {
return nil
}
func (i *Process) LastRequestTime() int64 {
return i.lastRequestTime.Load()
}
func (i *Process) WaitForHealthy(timeout int) error {
if !i.IsRunning() {
return fmt.Errorf("instance %s is not running", i.Name)