func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Access-Control-Allow-Origin", "*")
	id, err := uuid.Parse(chi.URLParam(r, "uuid"))
	if err != nil {
		http.Error(w, fmt.Sprintf("Error occurred: %s", err.Error()), http.StatusInternalServerError)
		return
	}
	if err := h.logs(w, job.ID(id)); err != nil {
		http.Error(w, fmt.Sprintf(" Error occurred: %s", err.Error()), http.StatusInternalServerError)
		return
	}
}
ServeHTTP responses log stream
package job
import (
	"context"
	"encoding/json"
	"fmt"
	"github.com/duck8823/duci/application"
	jobService "github.com/duck8823/duci/application/service/job"
	"github.com/duck8823/duci/domain/model/job"
	"github.com/go-chi/chi"
	"github.com/google/uuid"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
	"net/http"
)
type handler struct {
	service jobService.Service
}
func NewHandler() (http.Handler, error) {
	service, err := jobService.GetInstance()
	if err != nil {
		return nil, errors.WithStack(err)
	}
	return &handler{service: service}, nil
}