Skip to content

Commit

Permalink
Add outline of the calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
thegodenage committed Apr 15, 2024
1 parent e9c04d2 commit 28ba007
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions internal/packet/calculator.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package packet

import (
"context"
"sync"

"github.com/google/gopacket"

"waffle/internal/worker"
)

// Calculator is used in the packet serialization process.
// Implements PacketSerializer tho this struct recalculates
// the average size of the packets.
// https://www.tandfonline.com/doi/full/10.1080/23742917.2017.1384213
// https://journals.vilniustech.lt/index.php/MLA/article/view/4481/3817
type Calculator struct {
mu sync.Mutex
}

var _ worker.PacketSerializer = (*Calculator)(nil)

func (c *Calculator) SerializePackets(ctx context.Context, packetsChan <-chan gopacket.Packet) error {
//TODO implement me
panic("implement me")
}

0 comments on commit 28ba007

Please sign in to comment.