Skip to content

Commit

Permalink
stats: more informative stats
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Oct 13, 2021
1 parent a5cc766 commit c03b90b
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions stats/stats.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
package stats

import "log"

// Stats provides an interface that can be used to collect metrics about the server.
type Stats interface {
Tui()
Push()
Fetch()
Tui(action string)
Push(repo string)
Fetch(repo string)
}

type stats struct{}

func (s *stats) Tui(action string) {
log.Printf("TUI: %s", action)
}

func (s *stats) Push(repo string) {
log.Printf("git push: %s", repo)
}

func (s *stats) Fetch(repo string) {
log.Printf("git fetch: %s", repo)
}

func NewStats() Stats {
return &stats{}
}

0 comments on commit c03b90b

Please sign in to comment.