mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Prepare repository merge
This commit is contained in:
parent
b0ce152219
commit
9a5136190f
15 changed files with 41 additions and 11 deletions
0
.gitignore → connection/.gitignore
vendored
0
.gitignore → connection/.gitignore
vendored
30
connection/.gitlab-ci.yml
Normal file
30
connection/.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
image: golang:latest
|
||||
|
||||
variables:
|
||||
REPO_NAME: git.icinga.com/icingadb/icingadb-connection
|
||||
|
||||
before_script:
|
||||
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
|
||||
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
|
||||
- cd $GOPATH/src/$REPO_NAME
|
||||
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@git.icinga.com/".insteadOf "https://git.icinga.com/"
|
||||
- go get -t ./...
|
||||
|
||||
stages:
|
||||
- test
|
||||
- coverage
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- go fmt $(go list ./... | grep -v /vendor/)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- go test -race $(go list ./... | grep -v /vendor/) -cover
|
||||
|
||||
coverage:
|
||||
stage: coverage
|
||||
script:
|
||||
- ./coverage.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- coverage.html
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
|
@ -40,7 +40,7 @@ func mkMysql(dbType string, dbDsn string) (*sql.DB, error) {
|
|||
|
||||
mysql.SetLogger(oldlog.New(ioutil.Discard, "", 0))
|
||||
|
||||
db.SetMaxOpenConns(100)
|
||||
db.SetMaxOpenConns(50)
|
||||
db.SetMaxIdleConns(0)
|
||||
|
||||
return db, nil
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import "github.com/go-redis/redis"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"github.com/go-redis/redis"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"github.com/go-redis/redis"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package icingadb_connection
|
||||
package connection
|
||||
|
||||
import (
|
||||
"github.com/go-redis/redis"
|
||||
Loading…
Reference in a new issue