chore: Strip unneeded components from code.
This commit is contained in:
parent
62cc8b39ad
commit
cf90ddb104
19 changed files with 228 additions and 762 deletions
|
@ -1,16 +1,13 @@
|
|||
package commonbackend
|
||||
|
||||
type Start struct {
|
||||
Type string // Will be 'start' always
|
||||
Arguments []byte
|
||||
}
|
||||
|
||||
type Stop struct {
|
||||
Type string // Will be 'stop' always
|
||||
}
|
||||
|
||||
type AddProxy struct {
|
||||
Type string // Will be 'addProxy' always
|
||||
SourceIP string
|
||||
SourcePort uint16
|
||||
DestPort uint16
|
||||
|
@ -18,7 +15,6 @@ type AddProxy struct {
|
|||
}
|
||||
|
||||
type RemoveProxy struct {
|
||||
Type string // Will be 'removeProxy' always
|
||||
SourceIP string
|
||||
SourcePort uint16
|
||||
DestPort uint16
|
||||
|
@ -26,7 +22,6 @@ type RemoveProxy struct {
|
|||
}
|
||||
|
||||
type ProxyStatusRequest struct {
|
||||
Type string // Will be 'proxyStatusRequest' always
|
||||
SourceIP string
|
||||
SourcePort uint16
|
||||
DestPort uint16
|
||||
|
@ -34,7 +29,6 @@ type ProxyStatusRequest struct {
|
|||
}
|
||||
|
||||
type ProxyStatusResponse struct {
|
||||
Type string // Will be 'proxyStatusResponse' always
|
||||
SourceIP string
|
||||
SourcePort uint16
|
||||
DestPort uint16
|
||||
|
@ -50,27 +44,22 @@ type ProxyInstance struct {
|
|||
}
|
||||
|
||||
type ProxyInstanceResponse struct {
|
||||
Type string // Will be 'proxyConnectionResponse' always
|
||||
Proxies []*ProxyInstance // List of connections
|
||||
}
|
||||
|
||||
type ProxyInstanceRequest struct {
|
||||
Type string // Will be 'proxyConnectionRequest' always
|
||||
}
|
||||
|
||||
type BackendStatusResponse struct {
|
||||
Type string // Will be 'backendStatusResponse' always
|
||||
IsRunning bool // True if running, false if not running
|
||||
StatusCode int // Either the 'Success' or 'Failure' constant
|
||||
Message string // String message from the client (ex. failed to dial TCP)
|
||||
}
|
||||
|
||||
type BackendStatusRequest struct {
|
||||
Type string // Will be 'backendStatusRequest' always
|
||||
}
|
||||
|
||||
type ProxyConnectionsRequest struct {
|
||||
Type string // Will be 'proxyConnectionsRequest' always
|
||||
}
|
||||
|
||||
// Client's connection to a specific proxy
|
||||
|
@ -83,12 +72,10 @@ type ProxyClientConnection struct {
|
|||
}
|
||||
|
||||
type ProxyConnectionsResponse struct {
|
||||
Type string // Will be 'proxyConnectionsResponse' always
|
||||
Connections []*ProxyClientConnection // List of connections
|
||||
}
|
||||
|
||||
type CheckClientParameters struct {
|
||||
Type string // Will be 'checkClientParameters' always
|
||||
SourceIP string
|
||||
SourcePort uint16
|
||||
DestPort uint16
|
||||
|
@ -96,13 +83,11 @@ type CheckClientParameters struct {
|
|||
}
|
||||
|
||||
type CheckServerParameters struct {
|
||||
Type string // Will be 'checkServerParameters' always
|
||||
Arguments []byte
|
||||
}
|
||||
|
||||
// Sent as a response to either CheckClientParameters or CheckBackendParameters
|
||||
type CheckParametersResponse struct {
|
||||
Type string // Will be 'checkParametersResponse' always
|
||||
InResponseTo string // Will be either 'checkClientParameters' or 'checkServerParameters'
|
||||
IsValid bool // If true, valid, and if false, invalid
|
||||
Message string // String message from the client (ex. failed to unmarshal JSON: x is not defined)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue