api

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

README

API's

These provide API's to directly run CML pipeline directly.

First we set up config for the CML pipeline; Currently you can set the location of cml file Eg.

fileCfg := api.SetURISettings("file://cml.json")

Then we initilaize the CML pipeline using the above configuartion. Eg.

act, err := api.NewAction(fileCfg)

You could also add different config within this method Eg . NewAction(cfg1, cfg2)

Once initilaized you can run the pipleine using Run() Eg.

out, err := api.Run(act, inputs)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAction

func NewAction(option ...Option) (action.Action, error)

NewAction initializes a CML Action. CML Action is a type of Flogo Sync Action

func Run

func Run(act action.Action, inputs map[string]interface{}) (map[string]interface{}, error)

Run runs a CML Action .

Types

type Option

type Option func(*action.Config)

func SetURISettings

func SetURISettings(path string) Option

SetURISettings sets `catalystMlURI` config of action

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL