mirror of
https://github.com/trailbaseio/trailbase
synced 2026-04-21 13:37:44 +00:00
Add InitArgument.
This commit is contained in:
parent
f94ecd0389
commit
3bc30c5843
3 changed files with 13 additions and 2 deletions
|
|
@ -1,5 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<PackageId>TrailBase.Guest</PackageId>
|
||||
<Version>0.0.1</Version>
|
||||
<Authors>TrailBase authors</Authors>
|
||||
<PackageLicenseExpression>OSL-3.0</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://trailbase.io</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/trailbaseio/trailbase</RepositoryUrl>
|
||||
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace TrailbaseWorld.wit.exports.trailbase.runtime
|
|||
{
|
||||
public class InitEndpointImpl : IInitEndpoint
|
||||
{
|
||||
public static IInitEndpoint.InitResult Init()
|
||||
public static IInitEndpoint.InitResult Init(IInitEndpoint.InitArguments args)
|
||||
{
|
||||
Console.WriteLine("InitEndpoint.Init");
|
||||
return new IInitEndpoint.InitResult(httpHandlers: [(IInitEndpoint.MethodType.GET, "/fibonacci")], jobHandlers: []);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ interface init-endpoint {
|
|||
connect,
|
||||
}
|
||||
|
||||
record init-arguments {
|
||||
version: option<string>,
|
||||
}
|
||||
|
||||
record init-result {
|
||||
/// Registered http handlers (method, path)[].
|
||||
http-handlers: list<tuple<method-type, string>>,
|
||||
|
|
@ -21,7 +25,7 @@ interface init-endpoint {
|
|||
job-handlers: list<tuple<string, string>>,
|
||||
}
|
||||
|
||||
init: func() -> init-result;
|
||||
init: func(args: init-arguments) -> init-result;
|
||||
}
|
||||
|
||||
interface host-endpoint {
|
||||
|
|
|
|||
Loading…
Reference in a new issue