19 lines
411 B
Go
19 lines
411 B
Go
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.
|
|
}
|
|
}
|