Skip to content

Commit

Permalink
feat(moniker): Move OperationDescription from clouddriver to kork and…
Browse files Browse the repository at this point in the history
… add an overloaded applyMoniker method with the description parameter (#1199)

Added a new overloaded applyMoniker method to the Namer interface with an OperationDescription parameter. The new method defaults to calling the existing applyMoniker method without the description.
Moved the OperationDescription from clouddriver's com.netflix.spinnaker.clouddriver.orchestration to kork-moniker's com.netflix.spinnaker.orchestration.

Co-authored-by: Kunal Sharma <[email protected]>
  • Loading branch information
kunalsharma05 and Kunal Sharma authored Jul 30, 2024
1 parent cade67f commit 4cccd3f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.netflix.spinnaker.moniker;

import com.netflix.spinnaker.orchestration.OperationDescription;

/**
* A "Namer" takes some type "T" (e.g. a server group) and allows you to either
*
Expand All @@ -29,5 +31,18 @@
public interface Namer<T> {
void applyMoniker(T obj, Moniker moniker);

/**
* Sets a moniker on the given object with additional context provided by the description. This
* default implementation ignores the provided {@code description} and simply delegates to the
* {@link #applyMoniker(Object, Moniker)} method.
*
* @param obj the object to which the moniker will be applied
* @param moniker the moniker to apply
* @param description a description that provides additional context for the operation
*/
default void applyMoniker(T obj, Moniker moniker, OperationDescription description) {
applyMoniker(obj, moniker);
}

Moniker deriveMoniker(T obj);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.netflix.spinnaker.orchestration;

/** Marker interface for inputs to an AtomicOperation. */
public interface OperationDescription {}

0 comments on commit 4cccd3f

Please sign in to comment.