Class: Kongfigure::Synchronizers::Service

Inherits:
Base
  • Object
show all
Defined in:
lib/kongfigure/synchronizers/service.rb

Instance Attribute Summary

Attributes inherited from Base

#parent_resource, #remote_resources, #resources

Instance Method Summary collapse

Methods inherited from Base

#cleanup, #create, #find, #initialize, #synchronize_all, #synchronize_plugins, #synchronize_resource, #unchanged, #update

Constructor Details

This class inherits a constructor from Kongfigure::Synchronizers::Base

Instance Method Details

#resource_api_nameObject



8
9
10
# File 'lib/kongfigure/synchronizers/service.rb', line 8

def resource_api_name
  "services"
end

#resource_moduleObject



4
5
6
# File 'lib/kongfigure/synchronizers/service.rb', line 4

def resource_module
  Kongfigure::Resources::Service
end

#synchronize(resource) ⇒ Object



17
18
19
20
21
# File 'lib/kongfigure/synchronizers/service.rb', line 17

def synchronize(resource)
  synchronize_resource(resource)
  synchronize_routes(resource)
  synchronize_plugins(resource)
end

#synchronize_routes(resource) ⇒ Object



12
13
14
15
# File 'lib/kongfigure/synchronizers/service.rb', line 12

def synchronize_routes(resource)
  routes_synchronizer = Kongfigure::Synchronizers::Route.new(@http_client, resource.routes, resource)
  routes_synchronizer.synchronize_all
end