Skip to content

Commit

Permalink
update interface to use both enterprise and cloud hostname resolvers
Browse files Browse the repository at this point in the history
Signed-off-by: Abhijeet V <[email protected]>
  • Loading branch information
abvaidya committed May 16, 2024
1 parent 9587969 commit 71ba66e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ public interface StaticWorkloadDataRepository<T> {
/**
* Initializes the repository object
* @param privateKeyStore used to fetch necessary secrets to initialize the repository
* @param hostnameResolver used to resolve hostnames to ip addresses
* @param enterpriseHostnameResolver used to resolve hostnames to ip addresses for enterprise services
* @param cloudHostnameResolver used to resolve hostnames to ip addresses for cloud services
* @param msdStore used to fetch workload data from underlying storage
*/
void initialize(PrivateKeyStore privateKeyStore, HostnameResolver hostnameResolver, MsdStore msdStore);
void initialize(PrivateKeyStore privateKeyStore, HostnameResolver enterpriseHostnameResolver, HostnameResolver cloudHostnameResolver, MsdStore msdStore);

/**
* Returns static workload data from the corresponding repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ public interface StaticWorkloadDataRepositoryFactory {
/**
* Creates the Repository objects
* @param privateKeyStore used to fetch necessary secrets to initialize the repository
* @param hostnameResolver used to resolve hostnames to ip addresses
* @param enterpriseHostnameResolver used to resolve hostnames to ip addresses for enterprise services
* @param cloudHostnameResolver used to resolve hostnames to ip addresses for cloud services
* @param msdStore used to fetch workload data from underlying storage
* @param type type of static workload to get appropriate repository from the factory implementation
* @return static workload data repository object
*/
<T> StaticWorkloadDataRepository<T> create(final PrivateKeyStore privateKeyStore, final HostnameResolver hostnameResolver, final MsdStore msdStore,
<T> StaticWorkloadDataRepository<T> create(final PrivateKeyStore privateKeyStore, final HostnameResolver enterpriseHostnameResolver,
final HostnameResolver cloudHostnameResolver,
final MsdStore msdStore,
final StaticWorkloadType type);
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void testNoOpValidator() {

StaticWorkloadDataRepository<String> repository = new StaticWorkloadDataRepository<>() {
@Override
public void initialize(PrivateKeyStore privateKeyStore, HostnameResolver hostnameResolver, MsdStore msdStore) {
public void initialize(PrivateKeyStore privateKeyStore, HostnameResolver enterpriseHostnameResolver, HostnameResolver cloudHostnameResolver, MsdStore msdStore) {

}

Expand Down

0 comments on commit 71ba66e

Please sign in to comment.