Add Cleanupable interface
The Cleanup method is called on actors when they exit
This commit is contained in:
7
actor.go
7
actor.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user