Skip to content

Commit

Permalink
Make internal packages public
Browse files Browse the repository at this point in the history
  • Loading branch information
ioppermann committed Mar 19, 2024
1 parent 279d663 commit 385888d
Show file tree
Hide file tree
Showing 26 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test:

## fuzz: Run fuzz tests
fuzz:
go test -fuzz=Fuzz -run=^Fuzz ./internal/packet -fuzztime 30s
go test -fuzz=Fuzz -run=^Fuzz ./packet -fuzztime 30s

## vet: Analyze code for potential errors
vet:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
package congestion

import (
"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/packet"
)

// Sender is the sending part of the congestion control
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions internal/congestion/live/fake.go → congestion/live/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"sync"
"time"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/congestion"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/congestion"
"github.com/datarhei/gosrt/packet"
)

type fakeLiveReceive struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync"
"time"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/congestion"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/congestion"
"github.com/datarhei/gosrt/packet"
)

// ReceiveConfig is the configuration for the liveRecv congestion control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net"
"testing"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/packet"
"github.com/stretchr/testify/require"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/congestion/live/send.go → congestion/live/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"sync"
"time"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/congestion"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/congestion"
"github.com/datarhei/gosrt/packet"
)

// SendConfig is the configuration for the liveSend congestion control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net"
"testing"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/packet"
"github.com/stretchr/testify/require"
)

Expand Down
10 changes: 5 additions & 5 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"sync"
"time"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/congestion"
"github.com/datarhei/gosrt/internal/congestion/live"
"github.com/datarhei/gosrt/internal/crypto"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/congestion"
"github.com/datarhei/gosrt/congestion/live"
"github.com/datarhei/gosrt/crypto"
"github.com/datarhei/gosrt/packet"
)

// Conn is a SRT network connection.
Expand Down
4 changes: 2 additions & 2 deletions internal/crypto/crypto.go → crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"errors"
"fmt"

"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/internal/rand"
"github.com/datarhei/gosrt/packet"
"github.com/datarhei/gosrt/rand"

"github.com/benburkert/openpgp/aes/keywrap"
"golang.org/x/crypto/pbkdf2"
Expand Down
2 changes: 1 addition & 1 deletion internal/crypto/crypto_test.go → crypto/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/hex"
"testing"

"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/packet"

"github.com/stretchr/testify/require"
)
Expand Down
8 changes: 4 additions & 4 deletions dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"sync"
"time"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/crypto"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/internal/rand"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/crypto"
"github.com/datarhei/gosrt/packet"
"github.com/datarhei/gosrt/rand"
)

// ErrClientClosed is returned when the client connection has
Expand Down
4 changes: 2 additions & 2 deletions dial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/datarhei/gosrt/internal/circular"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/circular"
"github.com/datarhei/gosrt/packet"

"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 3 additions & 3 deletions listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"sync"
"time"

"github.com/datarhei/gosrt/internal/crypto"
srtnet "github.com/datarhei/gosrt/internal/net"
"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/crypto"
srtnet "github.com/datarhei/gosrt/net"
"github.com/datarhei/gosrt/packet"
)

// ConnType represents the kind of connection as returned
Expand Down
2 changes: 1 addition & 1 deletion listen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/packet"

"github.com/stretchr/testify/require"
)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/net/syncookie.go → net/syncookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"time"

"github.com/datarhei/gosrt/internal/rand"
"github.com/datarhei/gosrt/rand"
)

// SYNCookie implements a syn cookie for the SRT handshake.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions internal/packet/packet.go → packet/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"strings"
"sync"

"github.com/datarhei/gosrt/internal/circular"
srtnet "github.com/datarhei/gosrt/internal/net"
"github.com/datarhei/gosrt/circular"
srtnet "github.com/datarhei/gosrt/net"
)

const MAX_SEQUENCENUMBER uint32 = 0b01111111_11111111_11111111_11111111
Expand Down
4 changes: 2 additions & 2 deletions internal/packet/packet_test.go → packet/packet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sync"
"testing"

"github.com/datarhei/gosrt/internal/circular"
srtnet "github.com/datarhei/gosrt/internal/net"
"github.com/datarhei/gosrt/circular"
srtnet "github.com/datarhei/gosrt/net"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"sync"

"github.com/datarhei/gosrt/internal/packet"
"github.com/datarhei/gosrt/packet"
)

// PubSub is a publish/subscriber service for SRT connections.
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 385888d

Please sign in to comment.