Documentation ¶
Index ¶
- type SVC
- func (s *SVC) AddFlow(ctx context.Context, id nameid.ID, rd io.ReadCloser) error
- func (s *SVC) CancelRunningFlow(ctx context.Context, id nameid.ID) error
- func (s *SVC) GetAvailableMeta(ctx context.Context, id nameid.ID) (exported.FlowMetaInsight, error)
- func (s *SVC) InsightFlow(ctx context.Context, fid nameid.ID) (exported.FlowRunningInsight, error)
- func (s *SVC) InspectStdFunction(ctx context.Context, name string) exported.InspectStdFunction
- func (s *SVC) ListAvailables(ctx context.Context) []exported.FlowMetaInsight
- func (s *SVC) ListStdFunctions(ctx context.Context) []exported.ListStdFunctions
- func (s *SVC) LookupID(ctx context.Context, nameorid nameid.NameOrID) (nameid.ID, error)
- func (s *SVC) ReadyFlow(ctx context.Context, id nameid.ID, out io.Writer) (exported.FlowRunningInsight, error)
- func (s *SVC) StartEventFlow(ctx context.Context, id nameid.ID) chan error
- func (s *SVC) StartEventFlowAndWait(ctx context.Context, id nameid.ID) error
- func (s *SVC) StartFlow(ctx context.Context, id nameid.ID) chan error
- func (s *SVC) StartFlowAndWait(ctx context.Context, id nameid.ID) error
- func (s *SVC) StartFlowOrEventFlow(ctx context.Context, id nameid.ID) error
- func (s *SVC) ViewLog(ctx context.Context, id nameid.ID, seq int, w io.Writer) error
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SVC ¶
type SVC struct {
// contains filtered or unexported fields
}
SVC is the service layer, it provides API to access and manage the flows
func (*SVC) CancelRunningFlow ¶
CancelRunningFlow cancels a running flow, the canceled flow not be started again automatically.
func (*SVC) GetAvailableMeta ¶
GetAvailableMeta returns the meta of the flow with the flow id
func (*SVC) InsightFlow ¶
InsightFlow exports the statistics of the flow
func (*SVC) InspectStdFunction ¶
InspectStdFunction returns the manifest of the standard function
func (*SVC) ListAvailables ¶
func (s *SVC) ListAvailables(ctx context.Context) []exported.FlowMetaInsight
ListAvailables returns the list of all available flows in the flow source directory that be defined by the environment variable 'CO_FLOW_SOURCE_DIR'.
func (*SVC) ListStdFunctions ¶
func (s *SVC) ListStdFunctions(ctx context.Context) []exported.ListStdFunctions
ListStdFunctions returns the list of the manifests of all standard functions.
func (*SVC) ReadyFlow ¶
func (s *SVC) ReadyFlow(ctx context.Context, id nameid.ID, out io.Writer) (exported.FlowRunningInsight, error)
ReadyFlow initialize the flow and make it ready to run
func (*SVC) StartEventFlow ¶
StartEventFlow starts a flow with event triggers, it will run in a goroutine, so the invoking will return immediately.
func (*SVC) StartEventFlowAndWait ¶
StartEventFlowAndWait starts a flow with event triggers and wait for it to be finished.
func (*SVC) StartFlow ¶
StartFlow starts a flow without event triggers, it will return a channel that can be used to wait for the flow to be finished.
func (*SVC) StartFlowAndWait ¶
StartFlowAndWait starts a flow without event triggers and wait for it to be finished.
func (*SVC) StartFlowOrEventFlow ¶
StartFlowOrEventFlow don't start the flows directly, it first start triggers of the flows, then execute the flows based on event from trigger. If not found any triggers of the flow, it will start the flow directly.