Categorygithub.com/foliagecp/ui-app-lib
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

License golangci-lint

Work Flow

More detailed and complete scheme you can find here

Get Started

  1. Import the following package:
   import uilib "github.com/foliagecp/ui-app-lib"
  1. Register uilib functions to your Foliage Runtime
    runtime, err := statefun.NewRuntime(runtimeCfg)
    if err != nil {
        ...
    }

    uilib.RegisterAllFunctionTypes(runtime)
  1. Just start Foliage Runtime
    runtime.Start(cacheCfg, nil)
  1. Prepare JSON and generate some ID
{
    "payload":{
        "command": "info"
    }
}
  1. Send request to ui.ingress.<YOUR_ID> NATS topic via nats cli or from js with our JSON

  2. 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.

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author