mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 12:21:57 +00:00
chore: Adding mainFn helpers
This commit is contained in:
17
lib/mainFn/NetworkBuilder.ts
Normal file
17
lib/mainFn/NetworkBuilder.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Effects } from "../types";
|
||||
import { LocalPort } from "./LocalPort";
|
||||
import { TorHostname } from "./TorHostname";
|
||||
|
||||
export class NetworkBuilder {
|
||||
static of(effects: Effects) {
|
||||
return new NetworkBuilder(effects);
|
||||
}
|
||||
private constructor(private effects: Effects) {}
|
||||
|
||||
getTorHostName(id: string) {
|
||||
return new TorHostname(id, this.effects);
|
||||
}
|
||||
getPort(id: string) {
|
||||
return new LocalPort(id, this.effects);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user