Files
Georgios Komninos af155eecb7 feat: Adds saas mode and provisioner (#239)
This patch adds functionality to automatically
provisiomn a webserver that exposes:
- a REST API to submit keywords for scraping
- a WebUI to automatically workers
2026-03-08 15:32:24 +02:00

29 lines
511 B
Go

package rqueue
import (
"context"
"riverqueue.com/riverui"
"github.com/gosom/google-maps-scraper/log"
)
func CreateRiverUIHandler(_ context.Context, client *Client) (*riverui.Handler, error) {
endpoints := riverui.NewEndpoints(client.RiverClient(), nil)
logger := log.With("srv", "riverui")
opts := &riverui.HandlerOpts{
Endpoints: endpoints,
Logger: logger,
Prefix: "/riverui",
}
handler, err := riverui.NewHandler(opts)
if err != nil {
return nil, err
}
return handler, nil
}