mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #38536 - Moved PostJSONWithTimeout to platform/http - Created platform/errors package with only types needed by ctxerr. This way, ctxerr did not need to import fleethttp. - Made activity bounded context use PostJSONWithTimeout directly - Removed some activity types from legacy code that were no longer needed # Checklist for submitter - [ ] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. - Changes file `38536-new-activity-bc` already present, and this is just cleanup from that work. ## Testing - [x] Added/updated automated tests - [x] QA'd all new/changed functionality manually <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Refactor** * Reorganized error handling utilities for improved clarity and decoupling. * Consolidated HTTP utilities to centralize JSON posting functionality with timeout support. * Simplified activity service initialization by removing unused internal parameters. * Cleaned up test utilities and removed webhook-related test scaffolding. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
20 lines
585 B
Go
20 lines
585 B
Go
package activity
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// UpcomingActivityActivator activates the next upcoming activity in the queue.
|
|
// This is called when an activity implements ActivityActivator.
|
|
type UpcomingActivityActivator interface {
|
|
ActivateNextUpcomingActivity(ctx context.Context, hostID uint, fromCompletedExecID string) error
|
|
}
|
|
|
|
// DataProviders combines all external dependency interfaces for the activity
|
|
// bounded context. The ACL adapter implements this single interface.
|
|
type DataProviders interface {
|
|
UserProvider
|
|
HostProvider
|
|
AppConfigProvider
|
|
UpcomingActivityActivator
|
|
}
|