Skip to content

alphaHeavy/consul-haskell

Repository files navigation

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.