dao.go 333 B

123456789101112131415161718192021
  1. package monitor
  2. import (
  3. "go-common/app/job/main/archive/conf"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. // Dao is redis dao.
  7. type Dao struct {
  8. c *conf.Config
  9. client *bm.Client
  10. }
  11. // New is new redis dao.
  12. func New(c *conf.Config) (d *Dao) {
  13. d = &Dao{
  14. c: c,
  15. client: bm.NewClient(c.HTTPClient),
  16. }
  17. return d
  18. }