Skip to content

added reconciler pacakge with manager creation logic#131

Merged
NamanBalaji merged 2 commits into
mainfrom
feat/integrate-orbital
May 7, 2026
Merged

added reconciler pacakge with manager creation logic#131
NamanBalaji merged 2 commits into
mainfrom
feat/integrate-orbital

Conversation

@NamanBalaji

Copy link
Copy Markdown
Contributor

No description provided.

@push-tags-from-workflow push-tags-from-workflow Bot added dependencies Pull requests that update a dependency file tests feature labels May 5, 2026
@NamanBalaji NamanBalaji self-assigned this May 5, 2026
@NamanBalaji NamanBalaji requested review from apatsap, fabenan-f and jithinkunjachan and removed request for apatsap and jithinkunjachan May 5, 2026 08:11

@apatsap apatsap left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one simplification

Comment thread internal/reconciler/manager.go Outdated
Comment on lines +29 to +38
// TargetClientFactory builds Orbital initiators from reconciler targets.
type TargetClientFactory interface {
NewInitiator(ctx context.Context, target config.ReconcilerTarget) (orbital.Initiator, error)
}

type TargetClientFactoryFunc func(context.Context, config.ReconcilerTarget) (orbital.Initiator, error)

func (f TargetClientFactoryFunc) NewInitiator(ctx context.Context, target config.ReconcilerTarget) (orbital.Initiator, error) {
return f(ctx, target)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have TargetClientFactory and TargetClientFactoryFunc.

Can't we make it more simplistic and just use:

type TargetProvider func(context.Context, config.ReconcilerTarget) (orbital.Initiator, error)

Because technically TargetClientFactoryFunc is exactly that just wrapped in another interface.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes makes sense we just have targets of one type so it's overcomplicating

@NamanBalaji NamanBalaji force-pushed the feat/integrate-orbital branch from 425da03 to 2a1a728 Compare May 6, 2026 13:08
@NamanBalaji NamanBalaji merged commit 0a5b2fe into main May 7, 2026
4 checks passed
@NamanBalaji NamanBalaji deleted the feat/integrate-orbital branch May 7, 2026 08:38
if err != nil {
return nil, errors.Join(fmt.Errorf("create target %s client: %w", targetConfig.Name, err), closeTargets(ctx, targets))
}
if client == nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small thing will we return a nil without an error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file feature tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants