Add Cleanupable interface

The Cleanup method is called on actors when they exit
This commit is contained in:
2025-09-17 20:45:01 -04:00
parent e21cd9ed11
commit d34af2c4ee
3 changed files with 33 additions and 2 deletions

View File

@@ -127,3 +127,10 @@ type RunShutdownable interface {
// should be shut down.
Shutdown(ctx context.Context) error
}
// Cleanupable is any object that must be cleaned up after it has stopped for
// good. Actors which implement this interface will be cleaned up after they
// are deleted from the environment.
type Cleanupable interface {
Cleanup(ctx context.Context) error
}