-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a ServiceClient for direct and future references (cross lang)
Added another test case for the new client
- Loading branch information
Showing
8 changed files
with
104 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { BSBService, BSBServiceConstructor, ServiceClient } from "../../"; | ||
import { Plugin as S3Plugin } from "../service-default3/plugin"; | ||
|
||
export class Plugin extends BSBService<null> { | ||
public initBeforePlugins?: string[] | undefined; | ||
public runBeforePlugins?: string[] | undefined; | ||
public runAfterPlugins?: string[] | undefined; | ||
public methods = {}; | ||
dispose?(): void; | ||
init?(): void | Promise<void>; | ||
public override initAfterPlugins: string[] = []; | ||
private service3: ServiceClient<S3Plugin>; | ||
constructor(config: BSBServiceConstructor) { | ||
super(config); | ||
this.service3 = new ServiceClient(S3Plugin, this); | ||
} | ||
public override async run() { | ||
this.log.info("TEST CALLABLE OK ? [{result}]", { | ||
result: this.service3.callMethod("testMethod"), | ||
}); | ||
this.log.info("TEST RETURNABLE OK ? [{result}]", { | ||
result: await this.service3.events.emitEventAndReturn( | ||
"onReverseReturnable", | ||
5, | ||
"teXt" | ||
), | ||
}); | ||
} | ||
} |