Skip to content

Commit

Permalink
v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonmaur committed May 4, 2023
1 parent 3942519 commit f89128e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.1.1

- Update documentation and metadata
- Start required applications in mix.exs
- Fix http content-type header

## v1.1.0

- Added health checks config option
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<a href="https://github.com/jsonmaur/libcluster-droplet/actions/workflows/test.yml"><img alt="Test Status" src="https://img.shields.io/github/actions/workflow/status/jsonmaur/libcluster-droplet/test.yml?label=&style=for-the-badge&logo=github"></a> <a href="https://hexdocs.pm/libcluster_droplet/"><img alt="Hex Version" src="https://img.shields.io/hexpm/v/libcluster_droplet?style=for-the-badge&label=&logo=elixir" /></a>
# Libcluster Droplet

A [libcluster](https://github.com/bitwalker/libcluster) strategy for Digital Ocean Droplets. This clustering strategy will connect all Droplets in your account to the cluster and can optionally be filtered by Droplet name or tag. It works by polling the Digital Ocean API, so a valid [access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/) is required.

## Getting Started
- [Installation](#installation)
- [Configuration](#configuration)
- [Health Checks](#health-checks)
- [Releases](#releases)
- [Firewalls](#firewalls)

## Installation

```elixir
def deps do
Expand All @@ -26,7 +32,7 @@ config :libcluster,
]
```

### Config
## Configuration

| Key | Required | Description |
| :-- | :------: | :---------- |
Expand All @@ -39,7 +45,7 @@ config :libcluster,
| `:health_check` | | Whether to run [health checks](#health-checks) against the nodes before adding them to the cluster. |
| `:polling_interval` | | Number of milliseconds between polls to the API. Defaults to `5_000`. |

### Health Checks
## Health Checks

When optionally defined in the config, nodes will not be added to the cluster until they are reported as healthy. `:health_check` should be a tuple with the first element being the health check type, and the second element being a keyword list of options. Currently the only supported type is `:tcp` with the following options:

Expand Down
3 changes: 2 additions & 1 deletion lib/strategy/droplet.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
defmodule Cluster.Strategy.Droplet do
@moduledoc """
A libcluster strategy for Digital Ocean Droplets
A libcluster strategy for Digital Ocean Droplets. Check out the [README](readme.html) to get
started.
"""

use GenServer
Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule ClusterDroplet.MixProject do
def project do
[
app: :libcluster_droplet,
version: "1.1.0",
version: "1.1.1",
elixir: "~> 1.13",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
Expand All @@ -15,14 +15,14 @@ defmodule ClusterDroplet.MixProject do
source_url: @url,
homepage_url: "#{@url}#readme",
description: "A libcluster strategy for Digital Ocean Droplets",
authors: ["Jason Maurer"],
package: [
licenses: ["MIT"],
links: %{"GitHub" => @url}
],
docs: [
main: "readme",
extras: ["README.md"]
extras: ["README.md"],
authors: ["Jason Maurer"]
]
]
end
Expand Down

0 comments on commit f89128e

Please sign in to comment.