statemanager

package
v0.0.0-...-a1f36d2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package statemanager helps persist documents state to disk

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocumentStateDir

func DocumentStateDir(instanceID, locationFolder string) string

DocumentStateDir returns absolute filename where command states are persisted

func GetDocumentInfo

func GetDocumentInfo(log log.T, fileName, instanceID, locationFolder string) model.DocumentInfo

GetDocumentInfo returns the document info for the specified fileName

func GetDocumentInterimState

func GetDocumentInterimState(log log.T, fileName, instanceID, locationFolder string) model.DocumentState

GetDocumentInterimState returns CommandState object after reading file <fileName> from locationFolder under defaultLogDir/instanceID

func GetPluginState

func GetPluginState(log log.T, pluginID, commandID, instanceID, locationFolder string) *model.PluginState

GetPluginState returns PluginState after reading fileName from given locationFolder under defaultLogDir/instanceID

func IsDocumentCurrentlyExecuting

func IsDocumentCurrentlyExecuting(fileName, instanceID string) bool

IsDocumentCurrentlyExecuting checks if document already present in Pending or Current folder

func MoveDocumentState

func MoveDocumentState(log log.T, fileName, instanceID, srcLocationFolder, dstLocationFolder string)

MoveDocumentState moves the document file to target location

func PersistData

func PersistData(log log.T, fileName, instanceID, locationFolder string, object interface{})

PersistData stores the given object in the file-system in pretty Json indented format This will override the contents of an already existing file

func PersistDocumentInfo

func PersistDocumentInfo(log log.T, docInfo model.DocumentInfo, fileName, instanceID, locationFolder string)

PersistDocumentInfo stores the given PluginState in file-system in pretty Json indented format This will override the contents of an already existing file

func PersistPluginState

func PersistPluginState(log log.T, pluginState model.PluginState, pluginID, commandID, instanceID, locationFolder string)

PersistPluginState stores the given PluginState in file-system in pretty Json indented format This will override the contents of an already existing file

func RemoveData

func RemoveData(log log.T, commandID, instanceID, locationFolder string)

RemoveData deletes the fileName from locationFolder under defaultLogDir/instanceID

Types

This section is empty.

Directories

Path Synopsis
Package model provides model definitions for document state
Package model provides model definitions for document state

Jump to

Keyboard shortcuts

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