Skip to content

Commit 26c8415

Browse files
committed
refactor: rename instance.InstancePromise to instance.Promise
1 parent d435be2 commit 26c8415

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/cloudprovider/cloudprovider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (c *CloudProvider) createVMInstance(ctx context.Context, nodeClass *v1beta1
175175
}
176176

177177
// handleInstancePromise handles the instance promise, primarily deciding on sync/async provisioning.
178-
func (c *CloudProvider) handleInstancePromise(ctx context.Context, instancePromise instance.InstancePromise, nodeClaim *karpv1.NodeClaim) error {
178+
func (c *CloudProvider) handleInstancePromise(ctx context.Context, instancePromise instance.Promise, nodeClaim *karpv1.NodeClaim) error {
179179
if isNodeClaimStandalone(nodeClaim) {
180180
// Standalone NodeClaims aren't re-queued for reconciliation in the provision_trigger controller,
181181
// so we delete them synchronously. After marking Launched=true,
@@ -230,7 +230,7 @@ func (c *CloudProvider) handleInstancePromise(ctx context.Context, instancePromi
230230
return nil
231231
}
232232

233-
func (c *CloudProvider) handleInstancePromiseWaitError(ctx context.Context, instancePromise instance.InstancePromise, nodeClaim *karpv1.NodeClaim, waitErr error) {
233+
func (c *CloudProvider) handleInstancePromiseWaitError(ctx context.Context, instancePromise instance.Promise, nodeClaim *karpv1.NodeClaim, waitErr error) {
234234
c.recorder.Publish(cloudproviderevents.NodeClaimFailedToRegister(nodeClaim, waitErr))
235235
log.FromContext(ctx).Error(waitErr, "failed launching nodeclaim")
236236

pkg/providers/instance/instancepromise.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
)
2222

2323
// Intended for lifecycle handling on the higher abstractions.
24-
type InstancePromise interface {
24+
type Promise interface {
2525
// Cleanup removes the instance from the cloud provider.
2626
Cleanup(ctx context.Context) error
2727
// Wait blocks until the instance is ready.

0 commit comments

Comments
 (0)