Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Castellum
castellum_scheduler
Commits
0bd23860
Commit
0bd23860
authored
Aug 31, 2021
by
Bengfort
Browse files
split comment into README
parent
281e6fbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
broker/README.md
0 → 100644
View file @
0bd23860
This service translates normal HTTP to a custom protocol where requests
are sent as Server-Sent-Events (SSE) and responses are sent as HTTP POST
requests.
This is useful to send requests to services behind a firewall.
```
# establish SSE connection
curl "http://localhost:8001/castellum/"
# send a request (blocks until response is available or timeout)
curl "http://localhost:8001/scheduler/" --data foo
# send a response
curl "http://localhost:8001/castellum/?id=1&success" --data bar
```
broker/broker.go
View file @
0bd23860
// This service translates normal HTTP to a custom protocol here requests are
// sent as Server-Sent-Events (SSE) and responses are sent as HTTP POST
// requests.
//
// This is useful to send requests to services behind a firewall.
//
// # establish SSE connection
// curl "http://localhost:8001/castellum/"
//
// # send a request (blocks until response is available or timeout)
// curl "http://localhost:8001/scheduler/" --data foo
//
// # send a response
// curl "http://localhost:8001/castellum/?id=1&success" --data bar
package
main
import
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment