package com.fs.watch.task;

import java.util.List;
import java.util.Map;
import java.util.function.Supplier;

public class HealthCheckTask {
    private final String type;
    private final Supplier<List<Map<String, Object>>> queryFunction;

    public HealthCheckTask(String type, Supplier<List<Map<String, Object>>> queryFunction) {
        this.type = type;
        this.queryFunction = queryFunction;
    }

    public String getType() {
        return type;
    }

    public List<Map<String, Object>> query() {
        return queryFunction.get();
    }
}
