hunk.code_window: 	}()
   }
   // Stop stops monitor. Safe to call even if monitor wasn't started.
   func (m *Monitor) Stop() {
   	if m.cancellationFunc == nil {
   		return
   	}
   	m.cancellationFunc()
  
hunk.labels: keep keep keep keep add keep keep keep keep
hunk.after_edit: 	m.mu.Lock()
   	defer m.mu.Unlock()
  
hunk.file_path: api/adminmonitor/admin_monitor.go
hunk.type: add
file: angular.module('portainer.app').factory('Webhooks', [
    '$resource',
    'API_ENDPOINT_WEBHOOKS',
    function WebhooksFactory($resource, API_ENDPOINT_WEBHOOKS) {
      'use strict';
      return $resource(
        API_ENDPOINT_WEBHOOKS + '/:id',
        {},
        {
          query: { method: 'GET', isArray: true },
          create: { method: 'POST' },
          update: { method: 'PUT', params: { id: '@id' } },
          remove: { method: 'DELETE', params: { id: '@id' } },
        }
      );
    },
  ]);
  