refactor(dataplane): split dataplane.go into cohesive files (under size gate) - #440
Merged
Conversation
…ze gate) dataplane.go was 2782 lines (RED flag >1200). Split by protocol/concern into 8 files in the same package with no behavior, signature, or logic changes: - dataplane.go (1186L): C preamble, Context lifecycle, RunCustomStreamTest, internal RFC 2544 wrappers - dataplane_types.go (561L): all Go exported types (no CGO) - dataplane_cli.go (110L): pure-Go CLI wrapper methods (New, SetFrameSize, RunThroughput/Latency/FrameLoss/BackToBack) - dataplane_y1564.go (189L): Y.1564 config + perf tests - dataplane_rfc2889.go (284L): RFC 2889 five test methods + fillRFC2889Config - dataplane_rfc6349.go (158L): RFC 6349 path + throughput tests + fillRFC6349Config - dataplane_y1731.go (309L): Y.1731 four test methods + session/interval helpers - dataplane_mef.go (315L): MEF config/perf/full tests + fillMEFConfig - dataplane_tsn.go (378L): TSN four test methods + fillTSNConfig Each CGO file carries a minimal per-file C preamble (CGO requirement). All validation passed: go build ./..., go vet, golangci-lint (0 issues), go test.
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dataplane.gowas 2782 lines (RED flag >1200 incheck-file-size.sh); now 1186 lines (below the red-flag threshold)dataplanepackage — no behavior, signature, or logic changes anywhereSplit map
dataplane.goContextstruct + lifecycle,RunCustomStreamTest, RFC 2544 internal wrappers (RunSystemRecoveryTest,RunResetTest,runThroughputTestInternal, etc.)dataplane_types.godataplane_cli.goNew,SetFrameSize,RunThroughputTest,RunLatencyTest,RunFrameLossTest,RunBackToBackTestdataplane_y1564.goRunY1564ConfigTest,RunY1564PerfTestdataplane_rfc2889.gofillRFC2889Configdataplane_rfc6349.goRunRFC6349PathTest,RunRFC6349ThroughputTest,fillRFC6349Configdataplane_y1731.godataplane_mef.goRunMEFConfigTest,RunMEFPerfTest,RunMEFFullTest,fillMEFConfigdataplane_tsn.gofillTSNConfigValidation
Test plan
go doc ./internal/services/orchestrator/dataplane/...unchanged)dataplane_stub.go(non-CGO build path) is untouched