Skip to content

Repository files navigation

srvcs-averageweighted

Name

Field Value
Service srvcs-averageweighted
Slug averageweighted
Repository srvcs/averageweighted
Package srvcs-averageweighted
Kind orchestrator

Function

arithmetic: weighted average

Dependencies

Dependency Repository
srvcs-floatmultiply srvcs/floatmultiply
srvcs-floatadd srvcs/floatadd
srvcs-floatdivide srvcs/floatdivide

API

Method Path Purpose
GET / Service identity
POST / Evaluate the service function
GET /healthz Liveness probe
GET /readyz Readiness probe
GET /metrics Prometheus metrics
GET /openapi.json OpenAPI document

Inputs

Name Type Required
values json[] yes
weights json[] yes

Outputs

Name Type
values json[]
weights json[]
result number

Configuration

Variable Default Purpose
SRVCS_BIND_ADDR 0.0.0.0:8080 Bind address
SRVCS_ENV development Environment label for logs
RUST_LOG info,tower_http=info Tracing filter
SRVCS_FLOATADD_URL http://127.0.0.1:8091 Base URL for srvcs-floatadd
SRVCS_FLOATDIVIDE_URL http://127.0.0.1:8092 Base URL for srvcs-floatdivide
SRVCS_FLOATMULTIPLY_URL `` Base URL for srvcs-floatmultiply

Error Behavior

  • 422 means the request could not be evaluated for the documented input shape.
  • 503 means a required dependency was unavailable or returned an unexpected response.
  • Dependency validation errors are forwarded when this service delegates validation.

Local Checks

cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test

See the srvcs service standard for the full operational contract.

Metadata

Machine-readable service metadata lives in srvcs.yaml. Keep it aligned with this README when the service contract changes.

About

Arithmetic primitive: weighted average. A srvcs.cloud microservice.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages