File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1- package fpmConfig
1+ package phpfpm
22
33import (
44 "fmt"
@@ -21,7 +21,7 @@ type Pool struct {
2121 StatusPath string
2222}
2323
24- func Parse (fpmConfigPath string ) (Config , error ) {
24+ func ParseConfig (fpmConfigPath string ) (Config , error ) {
2525 c := Config {}
2626 cfg := ini .Empty ()
2727 err := cfg .Append (fpmConfigPath )
Original file line number Diff line number Diff line change 1- package fpmConfig
1+ package phpfpm
22
33import (
44 "testing"
77)
88
99func TestParse (t * testing.T ) {
10- c , err := Parse ("testData/php-fpm.conf" )
10+ c , err := ParseConfig ("testData/php-fpm.conf" )
1111 assert .Nil (t , err )
1212 assert .Equal (t , "testData/php-fpm.d/*.conf" , c .Include )
1313
Original file line number Diff line number Diff line change @@ -7,20 +7,18 @@ import (
77 "time"
88
99 "github.com/prometheus/client_golang/prometheus"
10-
11- "github.com/code-tool/docker-fpm-wrapper/fpmConfig"
1210)
1311
1412const namespace = "phpfpm"
1513
1614type stat struct {
1715 mu * sync.Mutex
1816 statuses []Status
19- pools []fpmConfig. Pool
17+ pools []Pool
2018}
2119
2220func RegisterPrometheus (fpmConfigPath string , update time.Duration ) error {
23- cfg , err := fpmConfig . Parse (fpmConfigPath )
21+ cfg , err := ParseConfig (fpmConfigPath )
2422 if err != nil {
2523 return err
2624 }
@@ -99,7 +97,7 @@ type FPMPoolStatus struct {
9997 slowRequests * prometheus.GaugeVec
10098}
10199
102- func NewFPMPoolStatus (pools []fpmConfig. Pool ) * FPMPoolStatus {
100+ func NewFPMPoolStatus (pools []Pool ) * FPMPoolStatus {
103101 poolLabelNames := []string {"pool_name" }
104102
105103 return & FPMPoolStatus {
You can’t perform that action at this time.
0 commit comments