Documentation
¶
Overview ¶
Package ui implements the UI service.
Index ¶
Constants ¶
const ServiceName = "ui"
ServiceName defines the name used for the UI service.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
UIPrefix string // Path prefix to host the UI at.
}
Options are used to configure the UI service. Options are constant for the lifetime of the UI service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the UI service.
func (*Service) Data ¶
func (s *Service) Data() any
Data implements service.Service. It returns nil, as the UI service does not have any runtime data.
func (*Service) Definition ¶
func (s *Service) Definition() service.Definition
Definition returns the definition of the HTTP service.
func (*Service) Run ¶
func (s *Service) Run(ctx context.Context, host service.Host) error
Run starts the UI service. It will run until the provided context is canceled or there is a fatal error.
func (*Service) ServiceHandler ¶
func (s *Service) ServiceHandler(host service.Host) (base string, handler http.Handler)
ServiceHandler implements http_service.ServiceHandler. It returns the HTTP endpoints to host the UI.
func (*Service) Update ¶
func (s *Service) Update(newConfig any) error
Update implements service.Service. It is a no-op since the UI service does not support runtime configuration.