Skip to content

Commit 59f1509

Browse files
authored
Merge branch 'main' into fix-example
2 parents 6bd9682 + d5ddb4e commit 59f1509

File tree

3 files changed

+204
-121
lines changed

3 files changed

+204
-121
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ The goals of the project are resiliency, performance, and ease of use.
1515
## Usage
1616

1717
``` elixir
18-
{:ok, gnat} = Gnat.start_link(%{host: '127.0.0.1', port: 4222})
18+
{:ok, gnat} = Gnat.start_link(%{host: "127.0.0.1", port: 4222})
1919
# Or if the server requires TLS you can start a connection with:
20-
# {:ok, gnat} = Gnat.start_link(%{host: '127.0.0.1', port: 4222, tls: true})
20+
# {:ok, gnat} = Gnat.start_link(%{host: "127.0.0.1", port: 4222, tls: true})
2121

2222
{:ok, subscription} = Gnat.sub(gnat, self(), "pawnee.*")
2323
:ok = Gnat.pub(gnat, "pawnee.news", "Leslie Knope recalled from city council (Jammed)")
@@ -31,16 +31,16 @@ end
3131

3232
``` elixir
3333
# with user and password
34-
{:ok, gnat} = Gnat.start_link(%{host: '127.0.0.1', port: 4222, username: "joe", password: "123", auth_required: true})
34+
{:ok, gnat} = Gnat.start_link(%{host: "127.0.0.1", port: 4222, username: "joe", password: "123", auth_required: true})
3535

3636
# with token
37-
{:ok, gnat} = Gnat.start_link(%{host: '127.0.0.1', port: 4222, token: "secret", auth_required: true})
37+
{:ok, gnat} = Gnat.start_link(%{host: "127.0.0.1", port: 4222, token: "secret", auth_required: true})
3838

3939
# with an nkey seed
40-
{:ok, gnat} = Gnat.start_link(%{host: '127.0.0.1', port: 4222, nkey_seed: "SUAM...", auth_required: true})
40+
{:ok, gnat} = Gnat.start_link(%{host: "127.0.0.1", port: 4222, nkey_seed: "SUAM...", auth_required: true})
4141

4242
# with decentralized user credentials (JWT)
43-
{:ok, gnat} = Gnat.start_link(%{host: '127.0.0.1', port: 4222, nkey_seed: "SUAM...", jwt: "eyJ0eX...", auth_required: true})
43+
{:ok, gnat} = Gnat.start_link(%{host: "127.0.0.1", port: 4222, nkey_seed: "SUAM...", jwt: "eyJ0eX...", auth_required: true})
4444

4545
# connect to NGS with JWT
4646
{:ok, gnat} = Gnat.start_link(%{host: "connect.ngs.global", tls: true, jwt: "ey...", nkey_seed: "SUAM..."})
@@ -53,7 +53,7 @@ In order to connect to these clusters you'll want to pass some extra TLS setting
5353

5454
``` elixir
5555
# using a basic TLS connection
56-
{:ok, gnat} = Gnat.start_link(%{host: '127.0.0.1', port: 4222, tls: true})
56+
{:ok, gnat} = Gnat.start_link(%{host: "127.0.0.1", port: 4222, tls: true})
5757

5858
# Passing a Client Certificate for verification
5959
{:ok, gnat} = Gnat.start_link(%{tls: true, ssl_opts: [certfile: "client-cert.pem", keyfile: "client-key.pem"]})

0 commit comments

Comments
 (0)