prime

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2023 License: MIT

README

license Go Report Card Go Reference Artifact Hub Docker Pulls

prime

Build

./build.sh

Usage

Start the server.

$ prime

Get the 100.000.000th prime.

$ time curl localhost:8080/prime/100000000
2038074743

real	0m1.300s
user	0m0.006s
sys	0m0.005s

Docker

Docker hub:

https://hub.docker.com/r/udhos/prime

Run from docker hub:

docker run -p 8080:8080 --rm udhos/prime:0.0.0

Build recipe:

./docker/build.sh

docker push udhos/prime:0.0.0

Helm chart

Using the repository

See https://udhos.github.io/prime/.

Create
mkdir charts
cd charts
helm create prime

Then edit files.

Lint
helm lint ./charts/prime --values charts/prime/values.yaml
Test rendering chart templates locally
helm template prime ./charts/prime --values charts/prime/values.yaml
Render templates at server
helm install prime ./charts/prime --values charts/prime/values.yaml --dry-run
Generate files for a chart repository

A chart repository is an HTTP server that houses one or more packaged charts. A chart repository is an HTTP server that houses an index.yaml file and optionally (*) some packaged charts.

(*) Optionally since the package charts could be hosted elsewhere and referenced by the index.yaml file.

docs
├── index.yaml
└── prime-0.1.0.tgz

See script update-charts.sh:

# generate chart package from source
helm package ./charts/prime -d ./docs

# regenerate the index from existing chart packages
helm repo index ./docs --url https://udhos.github.io/prime/
Install
helm install prime ./charts/prime --values charts/prime/values.yaml
Upgrade
helm upgrade prime ./charts/prime --values charts/prime/values.yaml
Uninstall
helm uninstall prime

Directories

Path Synopsis
cmd
prime command
Package main implements the program.
Package main implements the program.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL