Skip to content

Commit

Permalink
update providers
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartHarris committed Aug 14, 2024
1 parent 65345af commit 2aa5f8a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
20 changes: 10 additions & 10 deletions platform-wasmcloud/wadm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
traits:
- type: spreadscaler
properties:
replicas: 1
instances: 1
- type: link
properties:
target: sqldb-postgres
Expand All @@ -42,7 +42,7 @@ spec:
traits:
- type: spreadscaler
properties:
replicas: 2
instances: 20
- type: link
properties:
target: products-service
Expand Down Expand Up @@ -76,7 +76,7 @@ spec:
traits:
- type: spreadscaler
properties:
replicas: 2
instances: 10
- type: link
properties:
target: kv-redis
Expand All @@ -94,7 +94,7 @@ spec:
traits:
- type: spreadscaler
properties:
replicas: 2
instances: 10
- type: link
properties:
target: sqldb-postgres
Expand All @@ -112,7 +112,7 @@ spec:
traits:
- type: spreadscaler
properties:
replicas: 2
instances: 10

- name: orders-service
type: component
Expand All @@ -122,7 +122,7 @@ spec:
traits:
- type: spreadscaler
properties:
replicas: 2
instances: 10
- type: link
properties:
target: sqldb-postgres
Expand All @@ -149,7 +149,7 @@ spec:
- name: http-server
type: capability
properties:
image: ghcr.io/wasmcloud/http-server:0.20.1
image: ghcr.io/wasmcloud/http-server:0.22.0
id: http-server
traits:
- type: link
Expand All @@ -167,7 +167,7 @@ spec:
- name: kv-redis
type: capability
properties:
image: ghcr.io/wasmcloud/keyvalue-redis:0.24.0
image: ghcr.io/wasmcloud/keyvalue-redis:0.27.0
id: kv-redis
config:
- name: default-redis
Expand All @@ -177,7 +177,7 @@ spec:
- name: sqldb-postgres
type: capability
properties:
image: ghcr.io/wasmcloud/sqldb-postgres:0.1.0
image: ghcr.io/wasmcloud/sqldb-postgres:0.3.0
id: sqldb-postgres
config:
- name: default-pg
Expand All @@ -192,7 +192,7 @@ spec:
- name: nats
type: capability
properties:
image: ghcr.io/wasmcloud/messaging-nats:0.20.0
image: ghcr.io/wasmcloud/messaging-nats:0.22.0
id: nats
traits:
- type: link
Expand Down
13 changes: 3 additions & 10 deletions wasm-components/rust/http-controller/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@ export!(Component);
impl Guest for Component {
fn handle(request: IncomingRequest, response_out: ResponseOutparam) {
let method = request.method();
let path_and_query = request.path_with_query().unwrap();
let (path_parts, query) = request.parts();

log(
Level::Info,
"http-controller",
format!(
"Received {:?} request at {:?}?{:?}",
method, path_parts, query
)
.as_str(),
format!("Received {:?} request at {}", method, path_and_query).as_str(),
);

match path_parts
Expand All @@ -81,11 +78,7 @@ impl Guest for Component {
log(
Level::Info,
"http-controller",
format!(
"Completed {:?} request at {:?}?{:?}",
method, path_parts, query
)
.as_str(),
format!("Completed {:?} request at {}", method, path_and_query).as_str(),
);
}
}
Expand Down

0 comments on commit 2aa5f8a

Please sign in to comment.