Guest User

Untitled

a guest
May 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package callcount
  2.  
  3. import (
  4. "github.com/fnproject/fn/api/server"
  5. "github.com/fnproject/fn/fnext"
  6. )
  7.  
  8. var callCountMap map[string]int
  9.  
  10. func init() {
  11. callCountMap = make(map[string]int)
  12. server.RegisterExtension(&callCountExtension{})
  13. }
  14.  
  15. type callCountExtension struct {
  16. }
  17.  
  18. func (e *callCountExtension) Name() string {
  19. return "github.com/peterj/fn-extensions/callcount"
  20. }
  21.  
  22. func (e *callCountExtension) Setup(s fnext.ExtServer) error {
  23. s.AddCallListener(&CallCount{})
  24. return nil
  25. }
  26.  
  27. type CallCount struct {
  28. }
Add Comment
Please, Sign In to add comment