package com.lanyuanxiaoyao.service.forest.service;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
import com.lanyuanxiaoyao.service.common.entity.compaction.ScheduleJob;
import com.lanyuanxiaoyao.service.configuration.entity.queue.QueueItem;
import org.eclipse.collections.api.list.ImmutableList;

/**
 * 队列查询
 *
 * @author lanyuanxiaoyao
 * @date 2023-05-07
 */
@BaseRequest(baseURL = "http://service-queue/queue")
public interface QueueService {
    @Get("/names")
    ImmutableList<String> names();

    @Get("/all")
    ImmutableList<QueueItem<ScheduleJob>> all(@Query("name") String name);

    @Get("/size")
    Integer size(@Query("name") String name);
}
