
package org.apache.camel.cloud;

import java.util.List;

/**
 * Allows SPIs to implement custom Service Filter.
 *
 * @see ServiceDiscovery
 */
@FunctionalInterface
public interface ServiceFilter {
    /**
     * Chooses one of the service to use
     *
     * @param services  list of services
     * @return the chosen service to use.
     */
    <T extends ServiceDefinition> List<T> apply(List<T> services);
}
