modulepackage
0.0.0-20240427043224-377900064e46
Repository: https://github.com/foliagecp/ui-app-lib.git
Documentation: pkg.go.dev
# README
UI Lib
This is a complete set of Stateful Functions for working with web clients that use Foliage
Work Flow

More detailed and complete scheme you can find here
Get Started
- Import the following package:
import uilib "github.com/foliagecp/ui-app-lib"
- Register uilib functions to your Foliage Runtime
runtime, err := statefun.NewRuntime(runtimeCfg)
if err != nil {
...
}
uilib.RegisterAllFunctionTypes(runtime)
- Just start Foliage Runtime
runtime.Start(cacheCfg, nil)
- Prepare JSON and generate some ID
{
"payload":{
"command": "info"
}
}
-
Send request to
ui.ingress.<YOUR_ID>
NATS topic via nats cli or from js with our JSON -
Subscribe on
ui.egress.<YOUR_ID>
and listen result:
{
"client_id": "<YOUR_ID>",
"creation_time": 1695292826803661600,
"inactivity_timeout": "15m0s",
"last_activity_time": 1695292826803661600,
"life_time": 86400000000000
}
Documentation
For detailed installation instructions and prerequisites, visit the official documentation.
License
Unless otherwise noted, the easyjson source files are distributed under the Apache Version 2.0 license found in the LICENSE file.
Contribution
Contributions and bug reports are welcome! Please submit issues or pull requests to help improve this package.
# Functions
No description provided by the author