tree: 225f59366ade316bbd1c1d1a45a4831f58e84b69 [path history] [tgz]
  1. bootstrap/
  2. datasource/
  3. model/
  4. service/
  5. test/
  6. go.mod
  7. go.sum
  8. README.md
eventbase/README.md

eventbase

eventbase provides the crud interface of task and tombstone.

package

bootstrap:used to start initial loading.

datasource: realize the dao operation of etcd and mongo on task and tombstone.

domain: task and tombstone request.

service: Interfaces exposed by task and tombstone.

test: test parameters.

how to use

import (
	_ "github.com/apache/servicecomb-service-center/eventbase/bootstrap"
	"github.com/apache/servicecomb-service-center/eventbase/datasource"
	)

func Init(){
    dbCfg := db.Config{
    	Kind: "etcd",
    	URI: "http://127.0.0.1:2379",
    	Timeout: 10 * time.Second,
    }
    err := datasource.Init(dbCfg)
    ...
    datasource.GetDataSource().TaskDao()
    datasource.GetDataSource().TombstoneDao()
    ...
}