2024-02-13 20:52:10 +00:00
|
|
|
package temporal
|
|
|
|
|
|
|
|
import (
|
2024-05-23 16:33:30 +00:00
|
|
|
internal "github.com/mentos1386/zdravko/internal/config"
|
2024-02-13 20:52:10 +00:00
|
|
|
"github.com/temporalio/ui-server/v2/server"
|
|
|
|
"github.com/temporalio/ui-server/v2/server/config"
|
|
|
|
"github.com/temporalio/ui-server/v2/server/server_options"
|
|
|
|
)
|
|
|
|
|
2024-02-19 09:09:30 +00:00
|
|
|
func NewUiConfig(cfg *internal.TemporalConfig) *config.Config {
|
2024-02-13 20:52:10 +00:00
|
|
|
return &config.Config{
|
2024-02-19 09:09:30 +00:00
|
|
|
Host: cfg.ListenAddress,
|
2024-02-13 20:52:10 +00:00
|
|
|
Port: 8223,
|
2024-06-02 19:53:51 +00:00
|
|
|
TemporalGRPCAddress: "0.0.0.0:7233",
|
2024-02-13 20:52:10 +00:00
|
|
|
EnableUI: true,
|
2024-02-19 14:23:17 +00:00
|
|
|
PublicPath: "/settings/temporal",
|
2024-02-13 20:52:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUiServer(cfg *config.Config) (*server.Server, error) {
|
|
|
|
s := server.NewServer(server_options.WithConfigProvider(cfg))
|
|
|
|
return s, nil
|
|
|
|
}
|