// Path: src/main/java/com/bazoud/elasticsearch/river/git/GitRiverModule.java
// public class GitRiverModule extends AbstractModule {
//     @Override
//     protected void configure() {
//         bind(River.class).to(GitRiver.class).asEagerSingleton();
//         bind(FunctionFlowFactory.class).toInstance(new FunctionFlowFactory());
//     }
// }


import org.elasticsearch.common.inject.Module;
import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.river.RiversModule;
import com.bazoud.elasticsearch.river.git.GitRiverModule;
package com.bazoud.elasticsearch.plugin.river.git;



/**
 * @author Olivier Bazoud
 */
public class GitRiverPlugin extends AbstractPlugin {
    public static final String RIVER_TYPE = "git";

    @Override
    public String name() {
        return "git-river";
    }

    @Override
    public String description() {
        return "Git River Plugin";
    }

    @Override
    public void processModule(Module module) {
        if (module instanceof RiversModule) {
// Path: src/main/java/com/bazoud/elasticsearch/river/git/GitRiverModule.java
// public class GitRiverModule extends AbstractModule {
//     @Override
//     protected void configure() {
//         bind(River.class).to(GitRiver.class).asEagerSingleton();
//         bind(FunctionFlowFactory.class).toInstance(new FunctionFlowFactory());
//     }
// }


// Path: src/main/java/com/bazoud/elasticsearch/plugin/river/git/GitRiverPlugin.java
import org.elasticsearch.common.inject.Module;
import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.river.RiversModule;
import com.bazoud.elasticsearch.river.git.GitRiverModule;

package com.bazoud.elasticsearch.plugin.river.git;



/**
 * @author Olivier Bazoud
 */
public class GitRiverPlugin extends AbstractPlugin {
    public static final String RIVER_TYPE = "git";

    @Override
    public String name() {
        return "git-river";
    }

    @Override
    public String description() {
        return "Git River Plugin";
    }

    @Override
    public void processModule(Module module) {
        if (module instanceof RiversModule) {
            ((RiversModule) module).registerRiver(RIVER_TYPE, GitRiverModule.class);