18
internal/clouddetect/error.go
Normal file
18
internal/clouddetect/error.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package clouddetect
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
// GracefulShutdown handles context cancellation and cleanup for detection operations.
|
||||
func GracefulShutdown(ctx context.Context) {
|
||||
// Placeholder for future shutdown logic.
|
||||
// Currently, simply wait for context cancellation or a timeout.
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
// Context cancelled.
|
||||
case <-time.After(5 * time.Second):
|
||||
// Timeout reached.
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user