mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
Intermediary refactor teasing apart http / ipc
Introduces an IPC struct and moves the logic out of the http handlers and into methods on that.
This commit is contained in:
parent
c5ca41f138
commit
afd54c5d4c
4 changed files with 449 additions and 319 deletions
18
common/messages/ipc.go
Normal file
18
common/messages/ipc.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package messages
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
type Arg struct {
|
||||
Body []byte
|
||||
RemoteAddr string
|
||||
NatType string
|
||||
}
|
||||
|
||||
var (
|
||||
ErrBadRequest = errors.New("bad request")
|
||||
ErrInternal = errors.New("internal error")
|
||||
ErrUnavailable = errors.New("service unavailable")
|
||||
ErrTimeout = errors.New("timeout")
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue