Documentation ¶
Index ¶
- Constants
- func OpenConnectionV2(tag string, network string, address string, password string, db int, ...) (rmq.Connection, error)
- func Router(fRuntime *FlowRuntime) http.Handler
- type FlowDefinitionHandler
- type FlowExecutor
- func (fe *FlowExecutor) Configure(requestID string)
- func (fe *FlowExecutor) GetDataStore() (sdk.DataStore, error)
- func (fe *FlowExecutor) GetEventHandler() (sdk.EventHandler, error)
- func (fe *FlowExecutor) GetExecutionOption(_ sdk.Operation) map[string]interface{}
- func (fe *FlowExecutor) GetFlowDefinition(pipeline *sdk.Pipeline, context *sdk.Context) error
- func (fe *FlowExecutor) GetFlowName() string
- func (fe *FlowExecutor) GetLogger() (sdk.Logger, error)
- func (fe *FlowExecutor) GetReqAuthKey() (string, error)
- func (fe *FlowExecutor) GetStateStore() (sdk.StateStore, error)
- func (fe *FlowExecutor) GetValidationKey() (string, error)
- func (fe *FlowExecutor) HandleExecutionCompletion(data []byte) error
- func (fe *FlowExecutor) HandleNextNode(partial *executor.PartialState) error
- func (fe *FlowExecutor) Init(request *runtime.Request) error
- func (fe *FlowExecutor) LoggingEnabled() bool
- func (fe *FlowExecutor) MonitoringEnabled() bool
- func (fe *FlowExecutor) ReqAuthEnabled() bool
- func (fe *FlowExecutor) ReqValidationEnabled() bool
- func (fe *FlowExecutor) SetEventHandler(handler *sdk.EventHandler)
- type FlowRuntime
- func (fRuntime *FlowRuntime) Consume(message rmq.Delivery)
- func (fRuntime *FlowRuntime) CreateExecutor(req *runtime.Request) (executor.Executor, error)
- func (fRuntime *FlowRuntime) EnqueuePartialRequest(pr *runtime.Request) error
- func (fRuntime *FlowRuntime) EnterWorkerMode() error
- func (fRuntime *FlowRuntime) Execute(flowName string, request *runtime.Request) error
- func (fRuntime *FlowRuntime) ExitWorkerMode() error
- func (fRuntime *FlowRuntime) Init() error
- func (fRuntime *FlowRuntime) Pause(flowName string, request *runtime.Request) error
- func (fRuntime *FlowRuntime) Register(flows map[string]FlowDefinitionHandler) error
- func (fRuntime *FlowRuntime) Resume(flowName string, request *runtime.Request) error
- func (fRuntime *FlowRuntime) StartRuntime() error
- func (fRuntime *FlowRuntime) StartServer() error
- func (fRuntime *FlowRuntime) Stop(flowName string, request *runtime.Request) error
- func (fRuntime *FlowRuntime) StopServer() error
- type Task
- type Worker
Constants ¶
View Source
const ( InternalRequestQueueInitial = "goflow-internal-request" FlowKeyInitial = "goflow-flow" WorkerKeyInitial = "goflow-worker" GoFlowRegisterInterval = 4 RDBKeyTimeOut = 10 PartialRequest = "PARTIAL" NewRequest = "NEW" PauseRequest = "PAUSE" ResumeRequest = "RESUME" StopRequest = "STOP" )
View Source
const ( AsyncRequestHeader = "X-Async" RequestIdHeaderName = "X-Request-Id" )
View Source
const ( FlowNameParamName = "flowName" RequestIdParamName = "requestId" )
Variables ¶
This section is empty.
Functions ¶
func OpenConnectionV2 ¶
func OpenConnectionV2(tag string, network string, address string, password string, db int, errChan chan<- error) (rmq.Connection, error)
OpenConnection opens and returns a new connection
func Router ¶
func Router(fRuntime *FlowRuntime) http.Handler
Types ¶
type FlowDefinitionHandler ¶
type FlowExecutor ¶
type FlowExecutor struct { CallbackURL string // the callback url RequestAuthEnabled bool EnableMonitoring bool IsLoggingEnabled bool StateStore sdk.StateStore DataStore sdk.DataStore EventHandler sdk.EventHandler Logger sdk.Logger Handler FlowDefinitionHandler Runtime *FlowRuntime // contains filtered or unexported fields }
func (*FlowExecutor) Configure ¶
func (fe *FlowExecutor) Configure(requestID string)
func (*FlowExecutor) GetDataStore ¶
func (fe *FlowExecutor) GetDataStore() (sdk.DataStore, error)
func (*FlowExecutor) GetEventHandler ¶
func (fe *FlowExecutor) GetEventHandler() (sdk.EventHandler, error)
func (*FlowExecutor) GetExecutionOption ¶
func (fe *FlowExecutor) GetExecutionOption(_ sdk.Operation) map[string]interface{}
func (*FlowExecutor) GetFlowDefinition ¶
func (*FlowExecutor) GetFlowName ¶
func (fe *FlowExecutor) GetFlowName() string
func (*FlowExecutor) GetReqAuthKey ¶
func (fe *FlowExecutor) GetReqAuthKey() (string, error)
func (*FlowExecutor) GetStateStore ¶
func (fe *FlowExecutor) GetStateStore() (sdk.StateStore, error)
func (*FlowExecutor) GetValidationKey ¶
func (fe *FlowExecutor) GetValidationKey() (string, error)
func (*FlowExecutor) HandleExecutionCompletion ¶
func (fe *FlowExecutor) HandleExecutionCompletion(data []byte) error
func (*FlowExecutor) HandleNextNode ¶
func (fe *FlowExecutor) HandleNextNode(partial *executor.PartialState) error
func (*FlowExecutor) LoggingEnabled ¶
func (fe *FlowExecutor) LoggingEnabled() bool
func (*FlowExecutor) MonitoringEnabled ¶
func (fe *FlowExecutor) MonitoringEnabled() bool
func (*FlowExecutor) ReqAuthEnabled ¶
func (fe *FlowExecutor) ReqAuthEnabled() bool
func (*FlowExecutor) ReqValidationEnabled ¶
func (fe *FlowExecutor) ReqValidationEnabled() bool
func (*FlowExecutor) SetEventHandler ¶ added in v0.0.4
func (fe *FlowExecutor) SetEventHandler(handler *sdk.EventHandler)
type FlowRuntime ¶
type FlowRuntime struct { Flows map[string]FlowDefinitionHandler OpenTracingUrl string RedisURL string RedisPassword string DataStore sdk.DataStore Logger sdk.Logger Concurrency int ServerPort int ReadTimeout time.Duration WriteTimeout time.Duration RequestAuthEnabled bool EnableMonitoring bool RetryQueueCount int DebugEnabled bool // contains filtered or unexported fields }
func (*FlowRuntime) Consume ¶
func (fRuntime *FlowRuntime) Consume(message rmq.Delivery)
Consume messages from queue
func (*FlowRuntime) CreateExecutor ¶
func (*FlowRuntime) EnqueuePartialRequest ¶
func (fRuntime *FlowRuntime) EnqueuePartialRequest(pr *runtime.Request) error
func (*FlowRuntime) EnterWorkerMode ¶
func (fRuntime *FlowRuntime) EnterWorkerMode() error
EnterWorkerMode put the runtime into worker mode
func (*FlowRuntime) Execute ¶
func (fRuntime *FlowRuntime) Execute(flowName string, request *runtime.Request) error
func (*FlowRuntime) ExitWorkerMode ¶
func (fRuntime *FlowRuntime) ExitWorkerMode() error
ExitWorkerMode take the runtime out of worker mode
func (*FlowRuntime) Pause ¶
func (fRuntime *FlowRuntime) Pause(flowName string, request *runtime.Request) error
func (*FlowRuntime) Register ¶
func (fRuntime *FlowRuntime) Register(flows map[string]FlowDefinitionHandler) error
Register flows to the runtime If the flow is already registered, it returns an error
func (*FlowRuntime) Resume ¶
func (fRuntime *FlowRuntime) Resume(flowName string, request *runtime.Request) error
func (*FlowRuntime) StartRuntime ¶
func (fRuntime *FlowRuntime) StartRuntime() error
StartRuntime starts the runtime
func (*FlowRuntime) StartServer ¶
func (fRuntime *FlowRuntime) StartServer() error
StartServer starts listening for new request
func (*FlowRuntime) Stop ¶
func (fRuntime *FlowRuntime) Stop(flowName string, request *runtime.Request) error
func (*FlowRuntime) StopServer ¶
func (fRuntime *FlowRuntime) StopServer() error
StopServer stops the server
Source Files ¶
Click to show internal directories.
Click to hide internal directories.