update README
This commit is contained in:
17
README.md
17
README.md
@@ -66,20 +66,17 @@ The `/logs` endpoint is available to monitor what llama-swap is doing. It will s
|
|||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
```
|
```
|
||||||
# basic, sends up to the last 10KB of logs
|
# sends up to the last 10KB of logs
|
||||||
curl http://host/logs'
|
curl http://host/logs'
|
||||||
|
|
||||||
# add `stream` to stream new logs as they come in
|
# streams logs using chunk encoding
|
||||||
curl -Ns 'http://host/logs?stream'
|
curl -Ns 'http://host/logs/stream'
|
||||||
|
|
||||||
# add `skip` to skip history (only useful if used with stream)
|
# skips history and just streams new log entries
|
||||||
curl -Ns 'http://host/logs?stream&skip'
|
curl -Ns 'http://host/logs/stream?no-history'
|
||||||
|
|
||||||
# will output nothing :)
|
# streams logs using Server Sent Events
|
||||||
curl -Ns 'http://host/logs?skip'
|
curl -Ns 'http://host/logs/streamSSE'
|
||||||
|
|
||||||
# combine with pipes
|
|
||||||
curl -Ns 'http://host/logs?stream&skip' | grep 'tokens per second'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Systemd Unit Files
|
## Systemd Unit Files
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func getBinaryPath() string {
|
|||||||
return filepath.Join("..", "build", fmt.Sprintf("simple-responder_%s_%s", goos, goarch))
|
return filepath.Join("..", "build", fmt.Sprintf("simple-responder_%s_%s", goos, goarch))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestProcess_StartProxyStop(t *testing.T) {
|
func TestProcess_ProcessStartStop(t *testing.T) {
|
||||||
// Define the range
|
// Define the range
|
||||||
min := 12000
|
min := 12000
|
||||||
max := 13000
|
max := 13000
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ func (pm *ProxyManager) streamLogsHandlerSSE(c *gin.Context) {
|
|||||||
notify := c.Request.Context().Done()
|
notify := c.Request.Context().Done()
|
||||||
|
|
||||||
// Send history first if not skipped
|
// Send history first if not skipped
|
||||||
_, skipHistory := c.GetQuery("skip")
|
_, skipHistory := c.GetQuery("no-history")
|
||||||
if !skipHistory {
|
if !skipHistory {
|
||||||
history := pm.logMonitor.GetHistory()
|
history := pm.logMonitor.GetHistory()
|
||||||
if len(history) != 0 {
|
if len(history) != 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user