poll

module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT

README

Poll

This experimental repo gives an example of how the web server usage model can be transformed into an infrastructure definition making it possible to deploy the service with a cloud provider utilizing the resources derived from the usage model.

This repo is a Go module. Package votes with cmd/pollsvc provide the web service implementation that exposes REST API for collecting votes that represent if audience agrees with a speaker during a presentation.

This repo is also a CUE module. Package defs contains the definition of the service usage model expressed in CUE, as well as its transformation into a set of specific AWS cloud resources that can be instantiated with Terraform in order to deploy the web service. Still work in progress

Running go generate ./... is necessary before working with the data in the repo.

Some examples

(execute from the defs directory)

Check samples of the stored data.

cue eval -e summary.samples

Get memory requirement for the web service.

cue eval -e summary.req 

Directories

Path Synopsis
cmd
pollsvc
Command svc can be used to start an HTTP server that exposes REST API for the poll data management.
Command svc can be used to start an HTTP server that exposes REST API for the poll data management.
infra
present

Jump to

Keyboard shortcuts

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