Skip to content

Commit 8d80e89

Browse files
committed
remove not used methods
1 parent 1b5d656 commit 8d80e89

File tree

2 files changed

+0
-82
lines changed

2 files changed

+0
-82
lines changed

pkg/runner/config_builder.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -278,29 +278,6 @@ func WithTransportAndPorts(mcpTransport string, port, targetPort int) RunConfigB
278278
}
279279
}
280280

281-
// WithTransport configures the MCP transport protocol
282-
func WithTransport(mcpTransport string) RunConfigBuilderOption {
283-
return func(b *runConfigBuilder) error {
284-
b.transportString = mcpTransport
285-
return nil
286-
}
287-
}
288-
289-
// WithPort configures the proxy port
290-
func WithPort(port int) RunConfigBuilderOption {
291-
return func(b *runConfigBuilder) error {
292-
b.port = port
293-
return nil
294-
}
295-
}
296-
297-
// WithTargetPort configures the target port
298-
func WithTargetPort(targetPort int) RunConfigBuilderOption {
299-
return func(b *runConfigBuilder) error {
300-
b.targetPort = targetPort
301-
return nil
302-
}
303-
}
304281

305282
// WithAuditEnabled configures audit settings
306283
func WithAuditEnabled(enableAudit bool, auditConfigPath string) RunConfigBuilderOption {

pkg/runner/config_builder_test.go

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -936,65 +936,6 @@ func TestRunConfigBuilder_WithIndividualTransportOptions(t *testing.T) {
936936
checkTargetPort bool
937937
expectedTargetPort int
938938
}{
939-
{
940-
name: "WithTransport sets transport",
941-
opts: []RunConfigBuilderOption{
942-
WithTransport("sse"),
943-
},
944-
expectedTransport: "sse",
945-
// Port and TargetPort will be auto-generated for SSE transport
946-
checkPort: false,
947-
checkTargetPort: false,
948-
},
949-
{
950-
name: "WithPort sets port with stdio transport",
951-
opts: []RunConfigBuilderOption{
952-
WithTransport("stdio"), // Stdio transport to avoid auto-generated ports
953-
WithPort(9090),
954-
},
955-
expectedTransport: "stdio",
956-
checkPort: true,
957-
expectedPort: 9090,
958-
checkTargetPort: false,
959-
},
960-
{
961-
name: "WithTargetPort sets target port for SSE transport",
962-
opts: []RunConfigBuilderOption{
963-
WithTransport("sse"),
964-
WithTargetPort(8080),
965-
},
966-
expectedTransport: "sse",
967-
checkPort: false,
968-
checkTargetPort: true,
969-
expectedTargetPort: 8080,
970-
},
971-
{
972-
name: "All individual options together with SSE",
973-
opts: []RunConfigBuilderOption{
974-
WithTransport("sse"),
975-
WithPort(3000),
976-
WithTargetPort(4000),
977-
},
978-
expectedTransport: "sse",
979-
checkPort: true,
980-
expectedPort: 3000,
981-
checkTargetPort: true,
982-
expectedTargetPort: 4000,
983-
},
984-
{
985-
name: "Individual options override combined option",
986-
opts: []RunConfigBuilderOption{
987-
WithTransportAndPorts("stdio", 8080, 8080),
988-
WithTransport("sse"),
989-
WithPort(9000),
990-
WithTargetPort(9001),
991-
},
992-
expectedTransport: "sse",
993-
checkPort: true,
994-
expectedPort: 9000,
995-
checkTargetPort: true,
996-
expectedTargetPort: 9001,
997-
},
998939
}
999940

1000941
for _, tt := range tests {

0 commit comments

Comments
 (0)