Skip to content

Commit 9430b0b

Browse files
committed
Remove old way
1 parent 9644da1 commit 9430b0b

File tree

6 files changed

+12
-744
lines changed

6 files changed

+12
-744
lines changed

internal/controller/atlasthirdpartyintegrations/atlasthirdpartyintegrations_controller.go

Lines changed: 0 additions & 135 deletions
This file was deleted.

internal/controller/atlasthirdpartyintegrations/atlasthirdpartyintegrations_controller_test.go

Lines changed: 0 additions & 124 deletions
This file was deleted.

internal/controller/atlasthirdpartyintegrations/handler.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,29 @@ func (h *AtlasThirdPartyIntegrationHandler) HandleInitial(ctx context.Context, i
6565
if err != nil {
6666
return result.Error(state.StateInitial, fmt.Errorf("failed to populate integration: %w", err))
6767
}
68+
// TODO skew detection here
6869

6970
createdIntegration, err := req.Service.Create(ctx, req.Project.ID, integrationSpec)
7071
if err != nil {
7172
return result.Error(state.StateInitial, fmt.Errorf("failed to create Atlas Third Party Integration for %s: %w",
7273
integration.Spec.Type, err))
7374
}
7475
integration.Status.ID = createdIntegration.ID
75-
// patch the status here (think about improvements for autogen)
76+
// TODO patch the status here (think about improvements for autogen)
7677
return result.NextState(state.StateCreated,
7778
fmt.Sprintf("Creating Atlas Third Party Integration for %s", integration.Spec.Type))
7879
}
7980

81+
func (h *AtlasThirdPartyIntegrationHandler) HandleCreated(ctx context.Context, integration *akov2next.AtlasThirdPartyIntegration) (ctrlstate.Result, error) {
82+
return h.handleIdle(ctx, integration)
83+
}
84+
85+
func (h *AtlasThirdPartyIntegrationHandler) handleIdle(ctx context.Context, integration *akov2next.AtlasThirdPartyIntegration) (ctrlstate.Result, error) {
86+
// TODO skew detection here
87+
88+
return ctrlstate.Result{}, nil
89+
}
90+
8091
func (h *AtlasThirdPartyIntegrationHandler) newReconcileRequest(ctx context.Context, integration *akov2next.AtlasThirdPartyIntegration) (*reconcileRequest, error) {
8192
req := reconcileRequest{}
8293
sdkClientSet, err := h.ResolveSDKClientSet(ctx, integration)

internal/controller/atlasthirdpartyintegrations/state.go

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)