class DefaultAgentManagementService implements AgentManagementService {

    @Override
    public Completable updateInstanceGroupAttributes(String instanceGroupId, Map<String, String> attributes) {
        return agentCache.updateInstanceGroupStore(
                instanceGroupId,
                instanceGroup -> {
                    Map<String, String> updatedAttributes = CollectionsExt.merge(instanceGroup.getAttributes(), attributes);
                    return instanceGroup.toBuilder().withAttributes(updatedAttributes).build();
                }
        ).toCompletable();
    }

    @Inject public  DefaultAgentManagementService(AgentManagementConfiguration configuration,
                                         @Named(KUBE_SCHEDULER_INSTANCE_GROUP_PREDICATE) Predicate<AgentInstanceGroup> kubeSchedulerInstanceGroupPredicate,
                                         InstanceCloudConnector instanceCloudConnector,
                                         AgentCache AgentCache,
                                         ServerInfoResolver serverInfoResolver,
                                         TitusRuntime titusRuntime);

}