// Stop stops the REST service.
Stop stops the REST service.
// Stop stops the REST service .
func (s *Server) Stop(ctx context.Context) error {
	if !atomic.CompareAndSwapUint32(&s.started, 1, 0) {
		return fmt.Errorf("cannot stop HTTP server since it hasn't been started")
	}
	return s.httpServer.Shutdown(ctx)
}
func ( s * Server ) Stop ( ctx context . Context ) error { if ! atomic . CompareAndSwapUint32 ( & s . started , 1 , 0 ) { return fmt . Errorf ( " " ) } return s . httpServer . Shutdown ( ctx ) }
Stop stops the REST service.
Stop stops the REST service .