Skip to content

Commit

Permalink
bump to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbund committed Jul 6, 2024
1 parent 9fb4db3 commit f61122f
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 40 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# healthscript
# Healthscript

A [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) for writing healthchecks.
A [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) for writing healthchecks

![healthcheck example](https://healthscript.mbund.dev/https://example.com)
![healthcheck example](https://healthscript.mbund.dev/tcp://pwn.osucyber.club:13389%20<"cheese">)
Expand Down Expand Up @@ -41,6 +41,44 @@ The general philosophy behind the language design are as follows:
- `[POST] <aHR0cHM6Ly9naXRodWIuY29tL3Job21idXNnZy9oZWFsdGhzY3JpcHQ=> https://httpbin.org/post`
- ![](https://healthscript.mbund.dev/[POST]<aHR0cHM6Ly9naXRodWIuY29tL3Job21idXNnZy9oZWFsdGhzY3JpcHQ=>%20https://httpbin.org/post)

## Error Recovery

The parser will recover from errors as best as possible to help you write correct healthscript. Errors are available using the CLI.

![error handling](./errors.png)

Install the CLI with

```
cargo install healthscript-cli
```

## Badge Service

Append healthscript at the end of `https://healthscript.mbund.dev/` to have the hosted server run the healthcheck against your service and generate an svg badge. Then, you can use markdown syntax to include it in your own readmes.

```
![healthcheck for example.com](https://healthscript.mbund.dev/https://example.com)
```

![healthcheck for example.com](https://healthscript.mbund.dev/https://example.com)

You may need to url encode your spaces to `%20`.

## Library

Integrate healthscript into your own rust project. To do so, add the following to your `Cargo.toml`

```
healthscript = "1.0"
```

Or use the `cargo` CLI.

```
cargo add healthscript
```

## TCP Examples

- Connect to `pwn.osucyber.club` on port `13389` over TCP, and expect at least one byte to be returned
Expand Down Expand Up @@ -76,15 +114,3 @@ The general philosophy behind the language design are as follows:

- `dns://example.com/1.1.1.1`
- ![](https://healthscript.mbund.dev/dns://example.com/1.1.1.1)

## Badge Service

Append healthscript at the end of `https://healthscript.mbund.dev/` to have the hosted server run the healthcheck against your service and generate an svg badge. Then, you can use markdown syntax to include it in your own readmes.

```
![healthcheck for example.com](https://healthscript.mbund.dev/https://example.com)
```

![healthcheck for example.com](https://healthscript.mbund.dev/https://example.com)

You may need to url encode your spaces to `%20`.
Binary file added errors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions healthscript-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[package]
name = "healthscript-cli"
version = "0.1.0"
version = "1.0.0"
edition = "2021"
description = "CLI for healthscript, a simple DSL for checking the health of a service using HTTP, TCP, ICMP (ping), and more."
authors = ["Mark Bundschuh <mark@mbund.dev>"]
license = "MIT"
repository = "https://github.com/rhombusgg/healthscript"
keywords = ["http", "health", "monitoring"]

[dependencies]
clap = { version = "4.5.4", features = ["derive"] }
Expand All @@ -10,4 +15,3 @@ tokio = { version = "1.38.0", default-features = false, features = ["full"] }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
yansi = "1.0.1"

31 changes: 31 additions & 0 deletions healthscript-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Healthscript CLI

![error handling](./errors.png)

[Healthscript](https://crates.io/crates/healthscript) is a simple DSL for checking the health of a service using HTTP, TCP, ICMP (ping), and more.

Install the CLI to run healthchecks locally, and iterate with error messages.

```
cargo install healthscript-cli
```

```
$ healthscript-cli --help
CLI for healthscript, a simple DSL for checking the health of a service using HTTP, TCP, ICMP (ping), and more.
Usage: healthscript-cli <SCRIPT>
Arguments:
<SCRIPT> Healthscript to execute
Options:
-h, --help Print help
-V, --version Print version
```

## Badges

Another way to use healthscript, without installing anything to your computer, is to generate badges for markdown. [See it in the main healthscript repo](https://crates.io/crates/healthscript#badge-service)

![healthcheck example](https://healthscript.mbund.dev/https://example.com)
1 change: 1 addition & 0 deletions healthscript-cli/errors.png
8 changes: 6 additions & 2 deletions healthscript/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[package]
name = "healthscript"
version = "0.1.0"
version = "1.0.2"
edition = "2021"
description = "A simple DSL for checking the health of a service using HTTP, TCP, ICMP (ping), and more."
authors = ["Mark Bundschuh <mark@mbund.dev>"]
license = "MIT"
repository = "https://github.com/rhombusgg/healthscript"
keywords = ["http", "health", "monitoring"]

[dependencies]
ariadne = "0.4.1"
Expand Down Expand Up @@ -30,4 +35,3 @@ yansi = "1.0.1"

[dev-dependencies]
expect-test = "1.5.0"

1 change: 1 addition & 0 deletions healthscript/README.md
1 change: 1 addition & 0 deletions healthscript/errors.png

0 comments on commit f61122f

Please sign in to comment.