Documentation ¶
Index ¶
- type Configuration
- type Service
- func (s *Service) ApplyConfiguration(config interface{}) error
- func (s *Service) BeforeStart(ctx context.Context) error
- func (s *Service) CheckConfiguration(config interface{}) error
- func (s *Service) Init(config interface{}) (cdsclient.ServiceConfig, error)
- func (s *Service) Serve(ctx context.Context) error
- func (s *Service) Status(ctx context.Context) *sdk.MonitoringStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Name string `toml:"name" comment:"Name of this CDS UI Service\n Enter a name to enable this service" json:"name"` Staticdir string `toml:"staticdir" default:"./ui_static_files" comment:"This directory must contain the dist directory." json:"staticdir"` BaseURL string `` /* 143-byte string literal not displayed */ DeployURL string `` /* 246-byte string literal not displayed */ SentryURL string `toml:"sentryURL" commented:"true" comment:"Sentry URL. Optional" json:"-"` HTTP service.HTTPRouterConfiguration `toml:"http" comment:"######################\n CDS UI HTTP Configuration \n######################" json:"http"` URL string `toml:"url" comment:"Public URL of this UI service." default:"http://localhost:8080" json:"url"` API service.APIServiceConfiguration `toml:"api" comment:"######################\n CDS API Settings \n######################" json:"api"` HooksURL string `toml:"hooksURL" comment:"Hooks µService URL" default:"http://localhost:8083" json:"hooksURL"` CDNURL string `toml:"cdnURL" comment:"CDN µService URL" default:"http://localhost:8089" json:"cdnURL"` EnableServiceProxy bool `` /* 193-byte string literal not displayed */ }
Configuration is the ui configuration structure
type Service ¶
type Service struct { service.Common Cfg Configuration Router *api.Router Server *http.Server HTMLDir string DocsDir string }
Service is the stuct representing a ui µService
func (*Service) ApplyConfiguration ¶
ApplyConfiguration apply an object of type hooks.Configuration after checking it
func (*Service) BeforeStart ¶
Serve will start the http ui server
func (*Service) CheckConfiguration ¶
CheckConfiguration checks the validity of the configuration object
Click to show internal directories.
Click to hide internal directories.