Documentation
¶
Index ¶
- Constants
- Variables
- func WithTicker(t Ticker) func(*Handler)
- type Handler
- func (h *Handler) HandleForceNotify(resp http.ResponseWriter, req *http.Request)
- func (h *Handler) HandleGetConcept(resp http.ResponseWriter, req *http.Request)
- func (h *Handler) HandleGetConcepts(resp http.ResponseWriter, req *http.Request)
- func (h *Handler) HandleNotify(resp http.ResponseWriter, req *http.Request)
- func (h *Handler) RegisterEndpoints(router *mux.Router)
- type HealthService
- type HealthServiceConfig
- type Service
- func (s *Service) CheckKafkaConnectivity() error
- func (s *Service) ForceNotify(UUIDs []string, transactionID string) error
- func (s *Service) GetChangedConceptList(lastChange time.Time) (uuids []string, err error)
- func (s *Service) GetConcept(uuid string) ([]byte, error)
- func (s *Service) Notify(lastChange time.Time, transactionID string) error
- type Servicer
- type Ticker
Constants ¶
View Source
const TimeFormat = "2006-01-02T15:04:05Z"
TimeFormat is the format used to read time values from request parameters
Variables ¶
View Source
var LastChangeLimit = time.Hour * 168
LastChangeLimit represents the upper limit to how far in the past we can reingest smartlogic updates
Functions ¶
func WithTicker ¶ added in v1.6.0
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewNotifierHandler ¶
func (*Handler) HandleForceNotify ¶
func (h *Handler) HandleForceNotify(resp http.ResponseWriter, req *http.Request)
func (*Handler) HandleGetConcept ¶
func (h *Handler) HandleGetConcept(resp http.ResponseWriter, req *http.Request)
func (*Handler) HandleGetConcepts ¶ added in v1.8.0
func (h *Handler) HandleGetConcepts(resp http.ResponseWriter, req *http.Request)
func (*Handler) HandleNotify ¶
func (h *Handler) HandleNotify(resp http.ResponseWriter, req *http.Request)
func (*Handler) RegisterEndpoints ¶
type HealthService ¶
type HealthService struct { sync.RWMutex Checks []fthealth.Check // contains filtered or unexported fields }
HealthService is responsible for gtg and health checks.
func NewHealthService ¶
func NewHealthService(notifier Servicer, config *HealthServiceConfig, log *logger.UPPLogger) (*HealthService, error)
NewHealthService initialises the HealthCheck service but doesn't start the updating of the health check result.
func (*HealthService) GtgCheck ¶
func (hs *HealthService) GtgCheck() gtg.StatusChecker
GtgCheck is responsible for __gtg endpoint.
func (*HealthService) HealthcheckHandler ¶
func (hs *HealthService) HealthcheckHandler() fthealth.TimedHealthCheck
HealthcheckHandler is resposible for __health endpoint.
func (*HealthService) RegisterAdminEndpoints ¶
func (hs *HealthService) RegisterAdminEndpoints(router *mux.Router) http.Handler
RegisterAdminEndpoints adds the admin endpoints to the given router
func (*HealthService) Start ¶
func (hs *HealthService) Start()
Start starts separate go routine responsible for updating the cached result of the gtg/health check.
type HealthServiceConfig ¶ added in v1.9.1
type HealthServiceConfig struct { AppSystemCode string AppName string Description string SmartlogicModel string SmartlogicModelConcept string SuccessCacheTime time.Duration }
func (*HealthServiceConfig) Validate ¶ added in v1.9.1
func (c *HealthServiceConfig) Validate() error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewNotifierService ¶
func NewNotifierService(producer messageProducer, slClient smartlogic.Clienter, log *logger.UPPLogger) *Service
func (*Service) CheckKafkaConnectivity ¶
func (*Service) ForceNotify ¶
func (*Service) GetChangedConceptList ¶ added in v1.8.0
Click to show internal directories.
Click to hide internal directories.