Skip to content

Commit 55c9ea0

Browse files
committed
Update to renderer interface
Now that we're using channels to communicate beween our protocol incoming requests and renderer, we can drop the interface methods.
1 parent fd955af commit 55c9ea0

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

pkg/renderer/renderer.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
package renderer
22

33
import (
4-
"github.com/aaronvb/logrequest"
4+
"sync"
5+
6+
"github.com/aaronvb/request_hole/pkg/protocol"
57
)
68

79
// Renderer contains the interface which our servers use to render the output.
810
type Renderer interface {
911
// Start is called when we start our server.
10-
Start()
11-
12-
// Fatal is used when we need to display a message and should always exit the CLI.
13-
Fatal(error)
14-
15-
// IncomingRequest is called when we receive an incoming request to the server.
16-
IncomingRequest(logrequest.RequestFields, string)
17-
18-
// IncomingRequestHeaders is called when the details flag is passed and we want to
19-
// render the headers.
20-
IncomingRequestHeaders(map[string][]string)
12+
Start(*sync.WaitGroup, chan protocol.RequestPayload, chan int)
2113
}

0 commit comments

Comments
 (0)