Skip to content

Commit

Permalink
Updated readme to mention in-memory coordinator implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Kosiewski <[email protected]>
  • Loading branch information
Thomas Kosiewski committed Sep 10, 2024
1 parent 942fc6c commit a1edbe6
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# Tailscale Coordinator Library

This is a library that simplifies the implementation and integration of a control server for Tailscale into your Go application.
This is a library that simplifies the implementation and integration of a control
server for Tailscale into your Go application.

## Disclaimer

This project is not affiliated with Tailscale or Tailscale Inc., and it is not an official Tailscale or Tailscale Inc. project.
This project is not affiliated with Tailscale or Tailscale Inc., and it is not an
official Tailscale or Tailscale Inc. project.

## Installation

To install the library, run the following command:
You can install the library using the `go get` command:

```bash
go get github.com/loft-sh/tunnel
```

## Usage

To use the library, import it into your Go code and implement the tailscale coordinator interface:
There are two main ways to use this library: as a standalone library in your Go
code, or as an in-memory coordinator for end-to-end testing.

### Using the Library in Your Go Code

To use the library in your Go code, you'll need to import it and implement the
Tailscale coordinator interface.

```go
package main
Expand Down Expand Up @@ -45,9 +53,24 @@ func NewCoordinator() tunnel.Coordinator {
}
```

## Inspiration
### Using the In-Memory Coordinator

We also provide an in-memory control server, which is useful for running end-to-end
tests in a continuous integration or test environment. This server comes with
pre-configured profiles and nodes.

You can find an example of this server in the [examples/coordinator/](./examples/coordinator/)
directory.

This project is inspired by open-source tailscale control server implementations such as:
To configure the server, edit the [config file](./examples/coordinator/config.json).
Then, run the server with the following commands:

```bash
cd examples/coordinator
go run server.go
```

## Inspiration

- [Headscale](https://headscale.net)
- [Ionscale](https://jsiebens.github.io/ionscale/)
This project was inspired by open-source Tailscale control server implementations
such as [Headscale](https://headscale.net) and [Ionscale](https://jsiebens.github.io/ionscale/).

0 comments on commit a1edbe6

Please sign in to comment.