Skip to content

Commit 1e29232

Browse files
committed
Export params
1 parent b584840 commit 1e29232

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

neutral_cp.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ import (
77
)
88

99
type Config struct {
10-
registry string
11-
applicationName string
12-
serverAddress string
10+
Registry string
11+
ApplicationName string
12+
ServerAddress string
1313
}
1414

1515
type NeutralCP struct {
16-
config Config
16+
Config Config
1717
}
1818

1919
func (n *NeutralCP) Start(ctx context.Context) error {
2020
log.Println("Start neutral-cp")
2121

22-
switch n.config.registry {
22+
switch n.Config.Registry {
2323
case "pyroscope":
2424
n.startPyroscope(ctx)
2525

2626
default:
27-
return errors.New("unsupported registry: " + n.config.registry)
27+
return errors.New("unsupported registry: " + n.Config.Registry)
2828
}
2929

3030
return nil

pyroscope.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88

99
func (n *NeutralCP) startPyroscope(ctx context.Context) error {
1010
p, err := profiler.Start(profiler.Config{
11-
ApplicationName: n.config.applicationName,
11+
ApplicationName: n.Config.ApplicationName,
1212

13-
ServerAddress: n.config.serverAddress,
13+
ServerAddress: n.Config.ServerAddress,
1414

1515
ProfileTypes: []profiler.ProfileType{
1616
profiler.ProfileCPU,

pyroscope_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88

99
func TestStart(t *testing.T) {
1010
c := Config{
11-
registry: "pyroscope",
12-
applicationName: "testApp",
11+
Registry: "pyroscope",
12+
ApplicationName: "testApp",
1313
}
14-
ncp := NeutralCP{config: c}
14+
ncp := NeutralCP{Config: c}
1515

1616
ctx := context.Background()
1717
ctx, cancel := context.WithTimeout(ctx, 1*time.Second)

0 commit comments

Comments
 (0)