Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e65c723d25 | ||
|
|
9f54f8f6f7 | ||
|
|
25c81ada32 | ||
|
|
9b19731858 |
@@ -12,17 +12,21 @@ without having to be playing the game while doing it (fans are noisy).
|
|||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
To start replaying:
|
To start replaying:
|
||||||
`BeamNGMockOg replay [--loop] -a 127.0.0.1 -p 4443 -i sunburstManual.bin`
|
`telemetrymockserver beamng replay [--loop] -a 127.0.0.1 -p 4443 -i sunburstManual.bin`
|
||||||
- `loop` allows the replay functionality to keep replaying the same data file
|
- `loop` allows the replay functionality to keep replaying the same data file
|
||||||
|
|
||||||
|
|
||||||
To start recording:
|
To start recording:
|
||||||
`BeamNGMockOg record -a 127.0.0.1 -p 4443 -o sunburstDCT.bin`
|
`BeamNGMockOg beamng record -a 127.0.0.1 -p 4443 -o sunburstDCT.bin`
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
Use `tcpdump` to listen to the socket and check if data is coming through:
|
Use `tcpdump` to listen to the socket and check if data is coming through:
|
||||||
`tcpdump -i any udp port <port> -X`
|
`tcpdump -i any udp port <port> -X`
|
||||||
|
|
||||||
|
### TODO:
|
||||||
|
- [ ] Create the auto completion file and add it to `$FPATH`
|
||||||
|
- [ ] Create a shortcut so we don't have to type out `telemetrymockserver` everytime
|
||||||
|
|
||||||
|
|
||||||
### Benchmark
|
### Benchmark
|
||||||
Run with:
|
Run with:
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
beamng "github.com/ESilva15/TelemetryMockserver/internal/mockservers/beamng"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
// beamNGCmd is the parent command for the BeamNG agent actions
|
||||||
|
var beamNGCmd = &cobra.Command{
|
||||||
|
Use: "beamng",
|
||||||
|
Short: "BeamNG telemetry utilities",
|
||||||
|
Args: nil,
|
||||||
|
}
|
||||||
|
|
||||||
|
var beamNGRecordCMD = &cobra.Command{
|
||||||
|
Use: "record",
|
||||||
|
Short: "record -o <path-to-output-file>",
|
||||||
|
Long: `record will store the data from the given UDP server to the
|
||||||
|
filepath given by -o`,
|
||||||
|
Args: nil,
|
||||||
|
Run: recordAction,
|
||||||
|
}
|
||||||
|
|
||||||
|
var beamNGReplayCMD = &cobra.Command{
|
||||||
|
Use: "replay",
|
||||||
|
Short: "replay -i <path-to-input-file>",
|
||||||
|
Long: "replay will replay the data on the given filepath on a UDP server",
|
||||||
|
Args: nil,
|
||||||
|
Run: replayAction,
|
||||||
|
}
|
||||||
|
|
||||||
|
func recordAction(cmd *cobra.Command, args []string) {
|
||||||
|
outputFile, _ := cmd.Flags().GetString("output")
|
||||||
|
address, _ := cmd.Flags().GetString("address")
|
||||||
|
port, _ := cmd.Flags().GetInt("port")
|
||||||
|
|
||||||
|
recorder, err := beamng.NewRecorder(outputFile, address, port)
|
||||||
|
if err != nil {
|
||||||
|
panic(fmt.Sprintf("failed to create new BeamNG recorder: %+v", err))
|
||||||
|
}
|
||||||
|
defer recorder.Close()
|
||||||
|
|
||||||
|
// NOTE: is this doing anything at all??
|
||||||
|
ctx := context.Background()
|
||||||
|
if err := recorder.Record(ctx); err != nil {
|
||||||
|
fmt.Printf("Something went wrong while recording the file: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func replayAction(cmd *cobra.Command, args []string) {
|
||||||
|
inputFile, _ := cmd.Flags().GetString("input")
|
||||||
|
address, _ := cmd.Flags().GetString("address")
|
||||||
|
port, _ := cmd.Flags().GetInt("port")
|
||||||
|
loop, _ := cmd.Flags().GetBool("loop")
|
||||||
|
|
||||||
|
replayer, err := beamng.NewReplayer(address, port, inputFile)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Something went wrong setting up the player: %+v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: is this doing anything at all??
|
||||||
|
ctx := context.Background()
|
||||||
|
if err := replayer.Replay(ctx, loop); err != nil {
|
||||||
|
fmt.Printf("Something went wrong while playing the file: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// Beamng commnad flags
|
||||||
|
beamNGCmd.PersistentFlags().StringP("address", "a", "127.0.0.1", "Address for the UDP server")
|
||||||
|
beamNGCmd.MarkFlagRequired("address")
|
||||||
|
beamNGCmd.PersistentFlags().IntP("port", "p", 4444, "Port for the UDP server")
|
||||||
|
beamNGCmd.MarkFlagRequired("port")
|
||||||
|
|
||||||
|
// Record command flags
|
||||||
|
beamNGRecordCMD.Flags().StringP("output", "o", "output.bin", "output file for recording")
|
||||||
|
beamNGRecordCMD.MarkFlagRequired("output")
|
||||||
|
|
||||||
|
// Replay command flags
|
||||||
|
beamNGReplayCMD.Flags().BoolP("loop", "l", false, "whether to loop the recording")
|
||||||
|
beamNGReplayCMD.Flags().StringP("input", "i", "input.bin", "input file for reading")
|
||||||
|
beamNGReplayCMD.MarkFlagRequired("input")
|
||||||
|
|
||||||
|
rootCmd.AddCommand(beamNGCmd)
|
||||||
|
beamNGCmd.AddCommand(beamNGRecordCMD, beamNGReplayCMD)
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/ESilva15/TelemetryMockserver/internal/mockservers/iracing"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
// beamNGCmd is the parent command for the BeamNG agent actions
|
||||||
|
var iracingCmd = &cobra.Command{
|
||||||
|
Use: "iracing",
|
||||||
|
Short: "iRacing telemetry utility",
|
||||||
|
Args: nil,
|
||||||
|
}
|
||||||
|
|
||||||
|
var iracingReplayCMD = &cobra.Command{
|
||||||
|
Use: "replay",
|
||||||
|
Short: "replay -i <input-file> -o <output-memory-map-file>",
|
||||||
|
Long: "replays the <input-file> in the <output-memory-map-file>",
|
||||||
|
Args: nil,
|
||||||
|
Run: iracingReplayAction,
|
||||||
|
}
|
||||||
|
|
||||||
|
func iracingReplayAction(cmd *cobra.Command, args []string) {
|
||||||
|
// We need to get the path of the ibt.file
|
||||||
|
// outputFile, _ := cmd.Flags().GetString("output")
|
||||||
|
// inputFile, _ := cmd.Flags().GetString("input")
|
||||||
|
|
||||||
|
replayer, err := iracing.NewReplayer("", "")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Something went wrong setting up the player: %+v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: is this doing anything at all??
|
||||||
|
ctx := context.Background()
|
||||||
|
if err := replayer.Replay(ctx, false); err != nil {
|
||||||
|
fmt.Printf("Something went wrong while playing the file: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
rootCmd.AddCommand(iracingCmd)
|
||||||
|
|
||||||
|
iracingCmd.AddCommand(iracingReplayCMD)
|
||||||
|
|
||||||
|
// iracingReplayCMD flags
|
||||||
|
iracingReplayCMD.Flags().StringP("input", "i", "input.ibt", "input file")
|
||||||
|
// iracingReplayCMD.MarkFlagRequired("input")
|
||||||
|
iracingReplayCMD.Flags().StringP("output", "o", "memmap.file", "output memory mapped file")
|
||||||
|
// iracingReplayCMD.MarkFlagRequired("output")
|
||||||
|
}
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
package cmd
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/ESilva15/TelemetryMockserver/mockserver"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
)
|
|
||||||
|
|
||||||
func recordAction(cmd *cobra.Command, args []string) {
|
|
||||||
outputFile, _ := cmd.Flags().GetString("output")
|
|
||||||
address, _ := cmd.Flags().GetString("address")
|
|
||||||
port, _ := cmd.Flags().GetInt("port")
|
|
||||||
|
|
||||||
recorder, err := mockserver.NewRecorder(outputFile, address, port)
|
|
||||||
if err != nil {
|
|
||||||
panic(fmt.Sprintf("failed to create new BeamNG recorder: %+v", err))
|
|
||||||
}
|
|
||||||
defer recorder.Close()
|
|
||||||
|
|
||||||
// NOTE: is this doing anything at all??
|
|
||||||
ctx := context.Background()
|
|
||||||
if err := recorder.Record(ctx); err != nil {
|
|
||||||
fmt.Printf("Something went wrong while recording the file: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// shelf
|
|
||||||
var recordCmd = &cobra.Command{
|
|
||||||
Use: "record",
|
|
||||||
Short: "record -o <path-to-bin-file>",
|
|
||||||
Long: `record will store the data from the given UDP server to the
|
|
||||||
filepath given by -i`,
|
|
||||||
Args: nil,
|
|
||||||
Run: recordAction,
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
rootCmd.AddCommand(recordCmd)
|
|
||||||
|
|
||||||
recordCmd.PersistentFlags().StringP("output", "o", "output.bin", "output file for recording")
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
package cmd
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/ESilva15/TelemetryMockserver/mockserver"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
)
|
|
||||||
|
|
||||||
func replayAction(cmd *cobra.Command, args []string) {
|
|
||||||
inputFile, _ := cmd.Flags().GetString("input")
|
|
||||||
address, _ := cmd.Flags().GetString("address")
|
|
||||||
port, _ := cmd.Flags().GetInt("port")
|
|
||||||
loop, _ := cmd.Flags().GetBool("loop")
|
|
||||||
|
|
||||||
replayer, err := mockserver.NewReplayer(address, port, inputFile)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Printf("Something went wrong setting up the player: %+v", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: is this doing anything at all??
|
|
||||||
ctx := context.Background()
|
|
||||||
if err := replayer.Replay(ctx, loop); err != nil {
|
|
||||||
fmt.Printf("Something went wrong while playing the file: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// shelf
|
|
||||||
var replayCmd = &cobra.Command{
|
|
||||||
Use: "replay",
|
|
||||||
Short: "replay -i <path-to-bin-file>",
|
|
||||||
Long: `replay will replay the data on the given filepath on a UDP server`,
|
|
||||||
Args: nil,
|
|
||||||
Run: replayAction,
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
rootCmd.AddCommand(replayCmd)
|
|
||||||
|
|
||||||
replayCmd.PersistentFlags().StringP("input", "i", "nofile.bin", "input file for serving")
|
|
||||||
replayCmd.PersistentFlags().BoolP("loop", "l", false, "loop replay after finishing")
|
|
||||||
}
|
|
||||||
@@ -4,10 +4,14 @@ go 1.23.2
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/ESilva15/gobngsdk v1.1.3
|
github.com/ESilva15/gobngsdk v1.1.3
|
||||||
|
github.com/ESilva15/goirsdk v0.3.0
|
||||||
github.com/spf13/cobra v1.10.1
|
github.com/spf13/cobra v1.10.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
github.com/spf13/pflag v1.0.9 // indirect
|
github.com/spf13/pflag v1.0.9 // indirect
|
||||||
|
golang.org/x/sys v0.29.0 // indirect
|
||||||
|
golang.org/x/text v0.19.0 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
github.com/ESilva15/gobngsdk v1.1.3 h1:CFaz2KjHKnBLrQuEN1QHOd1761cWM/rmTwLpSLrgbe4=
|
github.com/ESilva15/gobngsdk v1.1.3 h1:CFaz2KjHKnBLrQuEN1QHOd1761cWM/rmTwLpSLrgbe4=
|
||||||
github.com/ESilva15/gobngsdk v1.1.3/go.mod h1:cKLaZRgM0tGGXDvosaSjHnxeyC5Y6rg7zCLqEUJnOzw=
|
github.com/ESilva15/gobngsdk v1.1.3/go.mod h1:cKLaZRgM0tGGXDvosaSjHnxeyC5Y6rg7zCLqEUJnOzw=
|
||||||
|
github.com/ESilva15/goirsdk v0.3.0 h1:6D95Avq7chikGHwEUKh7Y/HaLHOWQ75Qxaz8oMDSfrw=
|
||||||
|
github.com/ESilva15/goirsdk v0.3.0/go.mod h1:5borQbw+L4fe9b58JFHRHZwrzz0sMVAteuYbRnFOc0Q=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||||
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
@@ -8,5 +12,11 @@ github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
|
|||||||
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
|
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
|
||||||
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
|
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
|
||||||
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
|
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
||||||
|
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
|
||||||
|
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||||
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package iracing
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/ESilva15/goirsdk"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Replayer struct {
|
||||||
|
SDK *goirsdk.IBT
|
||||||
|
// DataSourcePath string
|
||||||
|
// Socket *UDPTransport
|
||||||
|
|
||||||
|
// Output memory mapped file
|
||||||
|
outputMmap string
|
||||||
|
|
||||||
|
// Streams
|
||||||
|
// dataViewCh chan ViewData
|
||||||
|
// socketCh chan []byte
|
||||||
|
|
||||||
|
// Mut
|
||||||
|
mut sync.RWMutex
|
||||||
|
|
||||||
|
// View
|
||||||
|
// viewData ViewData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewReplayer(input string, output string) (*Replayer, error) {
|
||||||
|
ibt, err := goirsdk.Init(goirsdk.Options{
|
||||||
|
SourceType: goirsdk.IBTFile,
|
||||||
|
SourcePath: "../testTelemetry/gt3_mustang_bathurst.ibt",
|
||||||
|
IBTExportType: goirsdk.SharedMemoryFile,
|
||||||
|
IBTExport: true,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
replayer := &Replayer{
|
||||||
|
SDK: ibt,
|
||||||
|
}
|
||||||
|
|
||||||
|
return replayer, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Replayer) Replay(ctx context.Context, loop bool) error {
|
||||||
|
mainLoopTicker := time.NewTicker(time.Second / 240)
|
||||||
|
defer mainLoopTicker.Stop()
|
||||||
|
|
||||||
|
for {
|
||||||
|
// Update the data that the SDK is holding with the next tick
|
||||||
|
_, err := r.SDK.Update(100 * time.Millisecond)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("could not update data: %v", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vehicle Movement data gathered from the names we can find on the
|
||||||
|
// telemetry_docs.pdf file
|
||||||
|
// - I wish to make this less verbose if possible
|
||||||
|
if _, ok := r.SDK.Vars.Vars["Gear"]; !ok {
|
||||||
|
log.Fatal("Field `Gear` doesn't exist")
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, ok := r.SDK.Vars.Vars["RPM"]; !ok {
|
||||||
|
log.Fatal("Field `RPM` doesn't exist")
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, ok := r.SDK.Vars.Vars["Speed"]; !ok {
|
||||||
|
log.Fatal("Field `Speed` doesn't exist")
|
||||||
|
}
|
||||||
|
|
||||||
|
gear := int32(r.SDK.Vars.Vars["Gear"].Value.(int))
|
||||||
|
rpm := int32(r.SDK.Vars.Vars["RPM"].Value.(float32))
|
||||||
|
speed := int32(r.SDK.Vars.Vars["Speed"].Value.(float32))
|
||||||
|
|
||||||
|
fmt.Printf("\033[?25l\033[2J\033[H")
|
||||||
|
fmt.Printf("Gear: %d, RPM: %d, Speed: %d", gear, rpm, speed)
|
||||||
|
|
||||||
|
<-mainLoopTicker.C
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// Package mockservers defines the available mockserver for the telemetry data
|
||||||
|
package mockservers
|
||||||
|
|
||||||
|
import "context"
|
||||||
|
|
||||||
|
// Mockserver defines what a mockserver should do
|
||||||
|
type Mockserver interface {
|
||||||
|
Replay(context.Context, bool)
|
||||||
|
Record(output string)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user