/consul-haskell

A haskell client library for consul (consul.io)

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Build Status

consul-haskell package: A consul client for Haskell

This package is a work-in-progress, but much of the functionality works.

API Status Matrix

Here's a matrix with the status of support for each of Consul's APIs.

Matrix Key

  • ✔️ - Supported/Implemented.
  • 🚧 — Under development (WIP).
  • ✖️ - Not yet supported (but planned).
  • ?: Don't know when we'll get to it, if ever.
Section API Name Status Test Status
ACLs ✖️ ✖️
Bootstrap ACLs ✖️ ✖️
Check ACL Replication ✖️ ✖️
Translate Rules ✖️ ✖️
Translate a Legacy Token's Rules ✖️ ✖️
Login to Auth Method ✖️ ✖️
Logout from Auth Method ✖️ ✖️
OIDC Authorization URL Request ? ?
OIDC Callback ? ?
Admin Partitions ? ?
Create a Partition ? ?
Read a Partition ? ?
Update a Partition ? ?
Delete a Partition ? ?
List all Partitions ? ?
Agent 🚧 🚧
Retrieve host information ✔️ ✔️
List Members ✖️ ✖️
Read Configuration ✖️ ✖️
Reload Agent ✖️ ✖️
Enable Maintenance Mode ✖️ ✖️
View Metrics ✖️ ✖️
Stream Logs ✖️ ✖️
Join Agent ✖️ ✖️
Graceful Leave and Shutdown ✖️ ✖️
Force Leave and Shutdown ✖️ ✖️
Update ACL Tokens ✖️ ✖️
Agent Check ✖️ ✖️
List Checks ✖️ ✖️
Register Check ✖️ ✖️
Deregister Check ✖️ ✖️
TTL Check Pass ✖️ ✖️
TTL Check Warn ✖️ ✖️
TTL Check Fail ✖️ ✖️
TTL Check Update ✖️ ✖️
Agent Service 🚧 🚧
List Services ✔️ ✔️
Get Service Configuration ✔️ ✔️
Get local service health ✔️ ✔️
Get local service health by ID ✖️ ✖️
Register Service ✔️ ✔️
Deregister Service ✔️ ✔️
Enable Maintenance Mode ✖️ ✖️
Agent Connect ✖️ ✖️
Authorize ✖️ ✖️
Certificate Authority (CA) Roots ✖️ ✖️
Service Leaf Certificate ✖️ ✖️
Catalog 🚧 🚧
Register Entity ✖️ ✖️
Deregister Entity ✖️ ✖️
List Datacenters ✔️ ✔️
List Nodes ✖️ ✖️
List Services ✖️ ✖️
List Nodes for Service ✖️ ✖️
List Nodes for Connect-capable Service ✖️ ✖️
Retrieve Map of Services for a Node ✖️ ✖️
List Services for Node ✖️ ✖️
List Services for Gateway ✖️ ✖️
Config ✖️ ✖️
Apply Configuration ✖️ ✖️
Get Configuration ✖️ ✖️
List Configurations ✖️ ✖️
Delete Configuration ✖️ ✖️
Connect ✖️ ✖️
Connect Certificate Authority (CA) ✖️ ✖️
List CA Root Certificates ✖️ ✖️
Get CA Configuration ✖️ ✖️
Update CA Configuration ✖️ ✖️
Connect Intentions ✖️ ✖️
Upsert Intention by Name ✖️ ✖️
Create Intention with ID ✖️ ✖️
Update Intention by ID ✖️ ✖️
Read Specific Intention by Name ✖️ ✖️
Read Specific Intention by ID ✖️ ✖️
List Intentions ✖️ ✖️
Delete Intention by Name ✖️ ✖️
Delete Intention by ID ✖️ ✖️
Check Intention Result ✖️ ✖️
List Matching Intentions ✖️ ✖️
Coordinates 🚧 🚧
Read WAN Coordinates 🚧 🚧
Read LAN Coordinates for all nodes 🚧 🚧
Read LAN Coordinates for a node 🚧 🚧
Update LAN Coordinates for a node 🚧 🚧
Discovery Chain ✖️ ✖️
Read Compiled Discovery Chain ✖️ ✖️
Events ✖️ ✖️
Fire Event ✖️ ✖️
List Events ✖️ ✖️
Health 🚧 🚧
List Checks for Node ✖️ ✖️
List Checks for Service ✔️ ✔️
List Service Instances for Service ✔️ ✔️
List Service Instances for Connect-enabled Service ✖️ ✖️
List Service Instances for Ingress Gateways Associated with a Service ✖️ ✖️
List Checks in State ✖️ ✖️
KV Store ✔️ ✔️
Read Key ✔️ ✔️
Create/Update Key ✔️ ✔️
Delete Key ✔️ ✔️
Operator ✖️ ✖️
Operator Network Areas ? ?
Create Network Area ? ?
List Network Areas ? ?
Update Network Area ? ?
List Specific Network Area ? ?
Delete Network Area ? ?
Join Network Area ? ?
List Network Area Members ? ?
Operator Autopilot ? ?
Read Configuration ? ?
Update Configuration ? ?
Read Health ? ?
Read the Autopilot State ? ?
Operator Keyring ? ?
List Gossip Encryption Keys ? ?
Add New Gossip Encryption Key ? ?
Change Primary Gossip Encryption Key ? ?
Delete Gossip Encryption Key ? ?
Operator License ? ?
Getting the Consul License ? ?
Operator Raft ✖️ ✖️
Read Configuration ✖️ ✖️
Delete Raft Peer ✖️ ✖️
Operator Segment ? ?
List Network Segments ? ?
Namespaces ✖️ ✖️
Create a Namespace ✖️ ✖️
Read a Namespace ✖️ ✖️
Update a Namespace ✖️ ✖️
Delete a Namespace ✖️ ✖️
List all Namespaces ✖️ ✖️
Prepared Queries ? ?
Create Prepared Query ? ?
List Prepared Queries ? ?
Read Prepared Query ? ?
Delete Prepared Query ? ?
Execute Prepared Query ? ?
Explain Prepared Query ? ?
Sessions 🚧 🚧
Create Session ✔️ ✔️
Delete Session ✔️ ✔️
Read Session ✔️ ✔️
List Sessions for Node ✖️ ✖️
List Sessions ✖️ ✖️
Renew Session ✔️ ✔️
Snapshots ✖️ ✖️
Generate Snapshot ✖️ ✖️
Restore Snapshot ✖️ ✖️
Status ✖️ ✖️
Get Raft Leader ✖️ ✖️
List Raft Peers ✖️ ✖️
Transactions ✖️ ✖️
Create Transaction ✖️ ✖️

Matrix Key

  • ✔️ - Supported/Implemented.
  • 🚧 — Under development (WIP).
  • ✖️ - Not yet supported (but planned).
  • ?: Don't know when we'll get to it, if ever.

Contributing

For contributions, please:

  • Make a pull request
  • Make sure the tests pass
  • Add a bullet to the Changelog

Run Tests

Use stack test; you will need to have consul available in your PATH.

If you don't want to care about such dependencies, install Nix, set up NUR (see shell.nix) and run:

stack --nix-shell-file shell.nix test

which will provide all needed programs for you.

History

The library was originally made by Alpha Heavy Industries. Maintainance has been helped by @nh2, with partial time sponsoring from FP Complete. Development continued by @ketzacoatl.