Skip to content

Commit 48e4a86

Browse files
remove(backend, BLCU): remove BLCU
1 parent 6e3c2b4 commit 48e4a86

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

backend/pkg/transport/constructor.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"sync"
66

77
"github.com/HyperloopUPV-H8/h9-backend/pkg/abstraction"
8-
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network/tftp"
98
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/presentation"
109
"github.com/rs/zerolog"
1110
)
@@ -36,12 +35,6 @@ func (transport *Transport) WithEncoder(encoder *presentation.Encoder) *Transpor
3635
return transport
3736
}
3837

39-
func (transport *Transport) WithTFTP(client *tftp.Client) *Transport {
40-
transport.tftp = client
41-
transport.logger.Trace().Msg("set TFTP")
42-
return transport
43-
}
44-
4538
func (transport *Transport) SetIdTarget(id abstraction.PacketId, target abstraction.TransportTarget) *Transport {
4639
transport.idToTarget[id] = target
4740
transport.logger.Trace().Uint16("id", uint16(id)).Str("target", string(target)).Msg("set id for target")

backend/pkg/transport/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import (
1212
"github.com/HyperloopUPV-H8/h9-backend/pkg/abstraction"
1313
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network"
1414
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network/tcp"
15-
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network/tftp"
1615
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network/udp"
1716
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/packet/data"
1817
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/presentation"
18+
"github.com/pin/tftp/v3"
1919
"github.com/rs/zerolog"
2020
)
2121

backend/pkg/transport/transport_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/HyperloopUPV-H8/h9-backend/pkg/abstraction"
1616
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network"
1717
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network/tcp"
18-
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network/tftp"
1918
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/network/udp"
2019
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/packet/data"
2120
"github.com/HyperloopUPV-H8/h9-backend/pkg/transport/presentation"
@@ -372,17 +371,6 @@ func TestTransport_SetTargetIp(t *testing.T) {
372371
}
373372
}
374373

375-
func TestWithTFTP(t *testing.T) {
376-
tr := NewTransport(defaultLogger())
377-
tr.SetAPI(noopTransportAPI{})
378-
client := &tftp.Client{}
379-
380-
out := tr.WithTFTP(client)
381-
if out.tftp != client {
382-
t.Fatalf("expected tftp client to be set")
383-
}
384-
}
385-
386374
func TestTransportErrors(t *testing.T) {
387375
tests := []struct {
388376
err error

0 commit comments

Comments
 (0)