Next step might actually be the TUI! Or maybe the raw proxy, it would be nice to be able to just run the proxy.
35 lines
1.0 KiB
Go
35 lines
1.0 KiB
Go
package model
|
|
|
|
type MessageType string
|
|
|
|
const (
|
|
MessageTypeSessionStarted MessageType = "SessionStarted"
|
|
MessageTypeSessionStopped MessageType = "SessionStopped"
|
|
|
|
MessageTypeProxyStarting MessageType = "ProxyStarting"
|
|
MessageTypeProxyStarted MessageType = "ProxyStarted"
|
|
MessageTypeProxyStopped MessageType = "ProxyStopped"
|
|
|
|
MessageTypeRequestStarted MessageType = "RequestStarted"
|
|
MessageTypeRequestFinished MessageType = "RequestFinished"
|
|
MessageTypeRequestFailed MessageType = "RequestFailed"
|
|
|
|
MessageTypeProcessStarting MessageType = "ProcessStarting"
|
|
MessageTypeProcessStarted MessageType = "ProcessStarted"
|
|
MessageTypeProcessExited MessageType = "ProcessExited"
|
|
MessageTypeProcessSignaled MessageType = "ProcessSignaled"
|
|
MessageTypeProcessStdout MessageType = "ProcessStdout"
|
|
MessageTypeProcessStderr MessageType = "ProcessStderr"
|
|
|
|
MessageTypeFatal MessageType = "Fatal"
|
|
MessageTypeWarn MessageType = "Warn"
|
|
)
|
|
|
|
type Message struct {
|
|
Type MessageType
|
|
Body string
|
|
PID int
|
|
ExitCode int
|
|
Request Request
|
|
}
|