dao.go 417 B

123456789101112131415161718192021222324
  1. package data
  2. import (
  3. "go-common/app/service/main/up/conf"
  4. "go-common/library/database/hbase.v2"
  5. "time"
  6. )
  7. //Dao hbase dao
  8. type Dao struct {
  9. c *conf.Config
  10. hbase *hbase.Client
  11. hbaseTimeOut time.Duration
  12. }
  13. //New create dao
  14. func New(c *conf.Config) (d *Dao) {
  15. d = &Dao{
  16. c: c,
  17. hbase: hbase.NewClient(&c.HBase.Config),
  18. hbaseTimeOut: time.Millisecond * 500,
  19. }
  20. return
  21. }