Skip to content

Commit 503e2f6

Browse files
committed
refactor: move internal packages to internal/ directory
- Move implementation packages (destructure, enrichers, filters, formatters, parser, handler) to internal/ - Update all import paths across the codebase - Fix Splunk integration tests by exposing port 8089 and using non-default password - Update docker-compose.test.yml with correct Splunk configuration - Update testing documentation to reflect actual requirements
1 parent 8925981 commit 503e2f6

63 files changed

Lines changed: 33 additions & 31 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

benchmark_alloc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
"github.com/willibrandon/mtlog/core"
8-
"github.com/willibrandon/mtlog/parser"
8+
"github.com/willibrandon/mtlog/internal/parser"
99
)
1010

1111
// Let's break down where allocations happen

configuration/builder.go

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

99
"github.com/willibrandon/mtlog"
1010
"github.com/willibrandon/mtlog/core"
11-
"github.com/willibrandon/mtlog/enrichers"
12-
"github.com/willibrandon/mtlog/filters"
11+
"github.com/willibrandon/mtlog/internal/enrichers"
12+
"github.com/willibrandon/mtlog/internal/filters"
1313
"github.com/willibrandon/mtlog/sinks"
1414
)
1515

convenience.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package mtlog
22

33
import (
44
"github.com/willibrandon/mtlog/core"
5-
"github.com/willibrandon/mtlog/destructure"
6-
"github.com/willibrandon/mtlog/enrichers"
7-
"github.com/willibrandon/mtlog/filters"
5+
"github.com/willibrandon/mtlog/internal/destructure"
6+
"github.com/willibrandon/mtlog/internal/enrichers"
7+
"github.com/willibrandon/mtlog/internal/filters"
88
"github.com/willibrandon/mtlog/sinks"
99
)
1010

docker/docker-compose.test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ services:
2323
container_name: splunk-test
2424
environment:
2525
- SPLUNK_START_ARGS=--accept-license
26-
- SPLUNK_PASSWORD=changeme
27-
- SPLUNK_HEC_TOKEN=00000000-0000-0000-0000-000000000000
26+
- SPLUNK_PASSWORD=Admin123!
27+
- SPLUNK_HEC_TOKEN=eb6baeef-eeb3-4a35-ab73-e17a12523b10
2828
ports:
2929
- "8000:8000"
3030
- "8088:8088"

docs/testing.md

Lines changed: 3 additions & 1 deletion

examples/context/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/willibrandon/mtlog"
88
"github.com/willibrandon/mtlog/core"
9-
"github.com/willibrandon/mtlog/enrichers"
9+
"github.com/willibrandon/mtlog/internal/enrichers"
1010
)
1111

1212
func main() {

examples/filtering/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/willibrandon/mtlog"
88
"github.com/willibrandon/mtlog/core"
9-
"github.com/willibrandon/mtlog/filters"
9+
"github.com/willibrandon/mtlog/internal/filters"
1010
)
1111

1212
func main() {

examples/rolling/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/willibrandon/mtlog"
10-
"github.com/willibrandon/mtlog/enrichers"
10+
"github.com/willibrandon/mtlog/internal/enrichers"
1111
"github.com/willibrandon/mtlog/sinks"
1212
)
1313

format_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/willibrandon/mtlog/core"
10-
"github.com/willibrandon/mtlog/parser"
10+
"github.com/willibrandon/mtlog/internal/parser"
1111
"github.com/willibrandon/mtlog/sinks"
1212
)
1313

integration/splunk_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ func querySplunkEvents(splunkURL, token, testID string) ([]map[string]interface{
448448
}
449449
password := os.Getenv("SPLUNK_PASSWORD")
450450
if password == "" {
451-
password = "changeme"
451+
password = "Admin123!"
452452
}
453453
req.SetBasicAuth(username, password)
454454
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")

0 commit comments

Comments
 (0)