Skip to content

Commit

Permalink
docs: clients: spell fix and better citations
Browse files Browse the repository at this point in the history
  • Loading branch information
turtleDev committed Sep 23, 2024
1 parent 71e2612 commit 3d085ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions docs/docs/clients/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Make sure that Go >= `1.16` is installed on your system. See [installation instructions](https://go.dev/doc/install) on Go's website for more info.

## Installation
Install Raccoon's Go client using
Install Raccoon's Go client using [go get](https://go.dev/ref/mod#go-get)
```bash
$ go get github.com/raystack/raccoon/clients/go
```
Expand Down Expand Up @@ -61,9 +61,9 @@ func main() {
#### Creating a client

Raccoon's API is exposed over 3 different protocols.
Depending on which protocol you wish to utilise to publish events to Raccoon, you will need to intantiate a different client.
Depending on which protocol you wish to utilise to publish events to Raccoon, you will need to instantiate a different client.

Following is a table describing which package you should use for a given protocol.
Following is a table describing which client package you should use for a given protocol.

| Protocol | Package |
| --- | --- |
Expand Down Expand Up @@ -103,17 +103,17 @@ Event's can be sent using `client.Send(events []*raccoon.Event)`. The return sig

For `gRPC` and `REST` clients, the response is returned synchronously. For `Websocket` the responses are returned asynchronously via a channel returned by `EventAcks()`.

`Event` structu has two fields: `Type` and `Data`.
`Event` struct has two fields: `Type` and `Data`.
`Type` denotes the event type. This is used by raccoon to route the event to a specific topic downstream. `Data` field contains the payload. This data is serialised by the `serializer` that's configured on the client. The serializer can be configured by using the `WithSerializer()` option of the respective clients.

The following table lists which serializer to use for a given payload type.

| Message Type | Serializer |
| --- | --- |
| JSON | `Serializer.JSON` |
| Protobuf | `Serializer.PROTO`|
| JSON | `serializer.JSON` |
| Protobuf | `serializer.PROTO`|

Once a client is constructed with a specific kind of serializer, you may only pass it events of that specific type. In particular, for `JSON` serialiser the event data must be a value that can be encoded by `json.Marshal`. While for `PROTOBUF` serialiser the event data must be a protobuf message.
Once a client is constructed with a specific kind of serializer, you may only pass it events of that specific type. In particular, for `JSON` serialiser the event data must be a value that can be encoded by [`json.Marshal`](https://pkg.go.dev/encoding/json#Marshal). While for `PROTOBUF` serialiser the event data must be a protobuf message.

### Examples
You can find examples of client usage over different protocols [here](https://github.com/raystack/raccoon/tree/main/clients/go/examples)
2 changes: 1 addition & 1 deletion docs/docs/clients/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Make sure that Nodejs >= `20.0` is installed on your system. See [installation instructions](https://nodejs.org/en/download/package-manager) on Nodejs's website for more info.

## Installation
Install Raccoon's Javascript client using npm
Install Raccoon's Javascript client using [npm](https://docs.npmjs.com/cli/v10/commands/npm)
```javascript
$ npm install --save @raystack/raccoon
```
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/clients/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Raccoon provides a suite of client libraries designed to help developers easily

## Wire and Serialization Types

A concept that exists in all the Client libraries is that of wire type and serialization type.
A concept that exists in all Raccoon Client libraries is that of wire type and serialization type.

Raccoon's API accepts both JSON and Protobuf requests. These are differentiated by the `Content-Type` header (in case of REST & gRPC protocols) and by `MessageType` for Websocket requests.

Expand All @@ -27,7 +27,7 @@ To start using Raccoon's client libraries, check out the detailed installation a

- [Golang](clients/golang.md)
- [Python](clients/python.md)
- [Java](clients/java.md)
- [JavaScript](clients/javascript.md)
- [Java](clients/java.md)

By leveraging Raccoon’s clients, you can focus on building your applications while Raccoon efficiently handles the ingestion of your clickstream events.
2 changes: 1 addition & 1 deletion docs/docs/clients/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Make sure that Python version `>=3.9` is installed on your system. See [installation instructions](https://docs.python.org/3.9/using/unix.html#getting-and-installing-the-latest-version-of-python) on Python's website for more information.

## Installation
Install Raccoon's Python client [pip](https://docs.python.org/3/installing/index.html)
Install Raccoon's Python client using [pip](https://docs.python.org/3/installing/index.html)
```bash
$ pip install raccoon_client
```
Expand Down

0 comments on commit 3d085ff

Please sign in to comment.