Skip to content

Foliage template-based interfaces visualisation library

License

Notifications You must be signed in to change notification settings

foliagecp/ui-app-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

233 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Foliage template-based interfaces visualisation library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages