Documentation ¶
Overview ¶
Package executer provides interfaces as document execution logic
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentFileStore ¶
type DocumentFileStore struct {
// contains filtered or unexported fields
}
DocumentFileStore dependent on the current file functions in docmanager to provide file save/load operations TODO need to refactor global lock in docmanager, or discard the entire package and impl the file IO here
func NewDocumentFileStore ¶
func NewDocumentFileStore(docID, location string, state *contracts.DocumentState, docMgr docmanager.DocumentMgr, isLocalSaveNeeded bool) DocumentFileStore
func (*DocumentFileStore) Load ¶
func (f *DocumentFileStore) Load() contracts.DocumentState
Load should happen in memory
func (*DocumentFileStore) Save ¶
func (f *DocumentFileStore) Save(docState contracts.DocumentState)
Save the document info struct to the current folder, Save() is desired only for crash-recovery
type DocumentStore ¶
type DocumentStore interface { Save(contracts.DocumentState) Load() contracts.DocumentState }
DocumentStore is an wrapper over the document state class that provides additional persisting functions for the Executer
type Executer ¶
type Executer interface { //TODO in future, docState should be de-composed into static/dynamic && plugin/document informations // Given a document and run it, receiving results from status update channel, return a map of plugin results Run(cancelFlag task.CancelFlag, docStore DocumentStore) chan contracts.DocumentResult }
Executer accepts an DocumentStore object, save when necessary for crash-recovery, and return when finshes the run, while the caller will pick up the result from the same docStore object
Directories ¶
Path | Synopsis |
---|---|
Package basicexecuter provides interfaces as document execution logic
|
Package basicexecuter provides interfaces as document execution logic |
Package iohandler implements the iohandler for the plugins
|
Package iohandler implements the iohandler for the plugins |
iomodule
Package iomodule implements the output modules
|
Package iomodule implements the output modules |
iomodule/mock
Package iomodulemock implements the mock iomodule
|
Package iomodulemock implements the mock iomodule |
mock
Package iohandlermocks implements the mock iohandler
|
Package iohandlermocks implements the mock iohandler |
multiwriter
Package multiwriter implements a multi-writer
|
Package multiwriter implements a multi-writer |
multiwriter/mock
Package multiwritermock creates the mock mulitwriter
|
Package multiwritermock creates the mock mulitwriter |
Package executer provides interfaces as document execution logic
|
Package executer provides interfaces as document execution logic |
proc
Package process wraps up the os.Process interface and also provides os-specific process lookup functions
|
Package process wraps up the os.Process interface and also provides os-specific process lookup functions |
sessionworker
Package main implements a separate worker which is used to execute requests from session manager.
|
Package main implements a separate worker which is used to execute requests from session manager. |
Package plugin contains general interfaces and types relevant to plugins.
|
Package plugin contains general interfaces and types relevant to plugins. |