Skip to content

Commit

Permalink
feat: rename signal to connqc and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ullaakut committed May 27, 2023
1 parent bf7599b commit 71b8382
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.env
/dist
/signal
/connqc
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
project_name: signal
project_name: connqc
dist: dist

gomod:
proxy: true

builds:
- main: ./cmd/signal
- main: ./cmd/connqc
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
goos:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM gcr.io/distroless/static:nonroot

COPY signal /signal
COPY connqc /connqc

ENV ADDR ":8123"

EXPOSE 8123
CMD ["./signal", "server"]
CMD ["./connqc", "server"]
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</a>
</p>

`signal` is a tool to control the quality of the network transport between multiple regions.
`connqc` is a tool to control the quality of the network transport between multiple regions.
It consists of a server that listens for TCP probing messages, and a client that sends said messages.
The client logs the probing duration and warns if some messages get lost.

Expand All @@ -34,13 +34,13 @@ The client logs the probing duration and warns if some messages get lost.
Start the server. The default address is `:8123`:

```shell
$ signal server
$ connqc server
```

or specify a port:

```shell
$ signal server --addr=":1234"
$ connqc server --addr=":1234"
```

#### More Options
Expand All @@ -49,7 +49,7 @@ The `server` command supports the following additional arguments.

```shell
OPTIONS:
--addr value The address to listen on for signals (default: ":8123") [$ADDR]
--addr value The address to listen on for probe messages (default: ":8123") [$ADDR]
--buffer-size value The size of the read buffer used by the server (default: 512) [$BUFFER_SIZE]
--read-timeout value The duration after which the server should timeout when reading from a connection (default: 2s) [$READ_TIMEOUT]
--write-timeout value The duration after which the server should timeout when writing to a connection (default: 5s) [$WRITE_TIMEOUT]
Expand All @@ -71,22 +71,22 @@ $ firewall-cmd --remove-port=8123/tcp

### Client

Start the client with the signal server's address:
Start the client with the connqc server's address:

```shell
$ signal client --addr="127.0.0.1:8123"
$ connqc client --addr="127.0.0.1:8123"
```

To enable more human-readable logs, set the log format:

```shell
$ signal client --addr="127.0.0.1:8123" --log.format="console"
$ connqc client --addr="127.0.0.1:8123" --log.format="console"
```

To increase the amount of sent requests, reduce the interval:

```shell
$ signal client --addr="127.0.0.1:8123" --interval="200ms"
$ connqc client --addr="127.0.0.1:8123" --interval="200ms"
```

#### More Options
Expand All @@ -95,7 +95,7 @@ The `client` command supports the following additional arguments.

```shell
OPTIONS:
--addr value The address of a signal server [$ADDR]
--addr value The address of a connqc server [$ADDR]
--backoff value Duration to wait for before retrying to connect to the server (default: 1s) [$BACKOFF]
--interval value Interval at which to send probe messages to the server (default: 1s) [$INTERVAL]
--read-timeout value The duration after which the client should timeout when reading from a connection (default: 2s) [$READ_TIMEOUT]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions cmd/signal/main.go → cmd/connqc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ var version = "¯\\_(ツ)_/¯"
var commands = []*cli.Command{
{
Name: "client",
Usage: "Run the signal client",
Usage: "Run the connqc client",
Flags: cmd.Flags{
&cli.StringFlag{
Name: flagAddr,
Usage: "The address of a signal server",
Usage: "The address of a connqc server",
Required: true,
EnvVars: []string{strcase.ToSNAKE(flagAddr)},
},
Expand Down Expand Up @@ -68,11 +68,11 @@ var commands = []*cli.Command{
},
{
Name: "server",
Usage: "Run the signal server",
Usage: "Run the connqc server",
Flags: cmd.Flags{
&cli.StringFlag{
Name: flagAddr,
Usage: "The address to listen on for signals",
Usage: "The address to listen on for probe messages",
Value: ":8123",
EnvVars: []string{strcase.ToSNAKE(flagAddr)},
},
Expand Down Expand Up @@ -115,7 +115,8 @@ func realMain() (code int) {
}()

app := cli.NewApp()
app.Name = "signal"
app.Name = "connqc"
app.Description = "Connection quality control checker"
app.Version = version
app.Commands = commands

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Package connqc contains the signal server and client implementations,
// Package connqc contains the connqc server and client implementations,
// as well as the probe message encoder and decoder.
package connqc
Binary file modified docs/assets/client.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/server.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion message.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
)

// Message represents a signal message.
// Message represents a connqc message.
type Message interface {
unexported()
}
Expand Down

0 comments on commit 71b8382

Please sign in to comment.