Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
remove start() and `stop()
Browse files Browse the repository at this point in the history
  • Loading branch information
eladb committed Oct 18, 2023
1 parent 1d5e3ad commit 6489a51
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 34 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ Slack](https://t.winglang.io).
- [ ] Use a `cloud.Redis` database
- [ ] Implement `cloud.Service` using containers.
- [x] Reference workload from another workload (without going through the load balancer) - Microservice example.
- [ ] `internalUrl()` in the simulator.
- [ ] `publicUrl()`
- [x] `internalUrl()` in the simulator/aws.
- [x] `publicUrl()` in simulator/aws.
- [ ] Logging in `tf-aws` (`Disabled logging because aws-logging configmap was not found. configmap
"aws-logging" not found`).
- [ ] Logging in `sim`.
Expand Down
6 changes: 0 additions & 6 deletions api.w
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
interface IWorkload extends std.IResource {
/** starts the container */
inflight start(): void;

/** stops the container */
inflight stop(): void;

/** internal url, `nil` if there is no exposed port */
getInternalUrl(): str?;

Expand Down
8 changes: 0 additions & 8 deletions containers.w
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ class Workload impl api.IWorkload {
this.publicUrl = this.inner.getPublicUrl();
}

pub inflight start() {
this.inner.start();
}

pub inflight stop() {
this.inner.stop();
}

pub getInternalUrl(): str? {
return this.inner.getInternalUrl();
}
Expand Down
12 changes: 2 additions & 10 deletions sim/workload.w
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Workload impl api.IWorkload {
}
}

pub inflight start(): void {
inflight start(): void {
log("starting workload...");

let opts = this.props;
Expand Down Expand Up @@ -150,16 +150,8 @@ class Workload impl api.IWorkload {
}
}

pub inflight stop() {
inflight stop() {
log("stopping container");
utils.shell("docker", ["rm", "-f", this.containerId]);
}

pub inflight url(): str? {
if let k = this.publicUrlKey {
return this.state.get(k).asStr();
} else {
return nil;
}
}
}
8 changes: 0 additions & 8 deletions tfaws/workload.w
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ class Workload impl workload_api.IWorkload {
pub getInternalUrl(): str? {
return this.internalUrl;
}

pub inflight start() {
throw "Not implemented yet";
}

pub inflight stop() {
throw "Not implemented yet";
}
}

class _Chart extends workload_cdk8s.Chart {
Expand Down

0 comments on commit 6489a51

Please sign in to comment.