Skip to content

Commit

Permalink
* collectors manager
Browse files Browse the repository at this point in the history
  • Loading branch information
ekho committed Aug 4, 2016
1 parent f5d8018 commit 2a58dc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/nginx-metrix/collectors_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ describe('nginx-metrix.collectors', function()
collectors.init:revert()
end)

it('registed', function()
pending('implement it')
end)

it('init', function()
stub(collectors, 'register')
local storage_emu = { 'storage' }
Expand All @@ -38,7 +42,6 @@ describe('nginx-metrix.collectors', function()
assert.spy(collectors.register).was_not_called()
assert.is_equal(storage_emu, collectors._storage)


-- process builtin collectors
collectors.init({}, storage_emu)
assert.spy(collectors.register).was_called_with(collector_request_mock)
Expand Down
2 changes: 2 additions & 0 deletions src/nginx-metrix/collectors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ M._builtin = fun.iter { 'request', 'status', 'upstream' }

function M.register(collector)
M._logger:debug('Registering collector', collector)
error('Not implemented yet')
end

---
Expand All @@ -32,6 +33,7 @@ end
--
function M.exec_all(phase)
M._logger:debug('exec_all', phase)
error('Not implemented yet')
end

------------------------------------------------------------------------------
Expand Down

0 comments on commit 2a58dc7

Please sign in to comment.