Documentation ¶
Index ¶
- Constants
- func UID() int64
- type Persistance
- func (persistance *Persistance) ClosePersistance()
- func (p *Persistance) IndexTask()
- func (p *Persistance) ReadAllFiles() (*map[string]string, error)
- func (p *Persistance) ReadFilePath(fileID string) (string, error)
- func (p *Persistance) ReadTask(taskId string) (*app.AtqTaskFull, error)
- func (p *Persistance) StoreFile(fileID, path string) error
- func (p *Persistance) StoreTask(alias string, fileID *string, delay int) error
- func (p *Persistance) StoreTaskMaster(taskId, serviceID, alias string) error
- func (p *Persistance) StoreTaskWorker(taskId, serviceID, alias string) error
Constants ¶
View Source
const Filekey = "file:"
Filekey defines the key in the datastore for files
View Source
const TaskAliasMaster = ":masteralias"
View Source
const TaskAliasWorker = ":workeralias"
View Source
const TaskDelay = ":delay"
View Source
const TaskFileId = ":fileId"
View Source
const TaskMaster = ":master"
View Source
const TaskStatus = ":status"
View Source
const TaskWorker = ":worker"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Persistance ¶
Persistance contains all relevant data to the Framework datastore
func InitPersistance ¶
func InitPersistance(path string, glusterPath string, discoveryHost string) (*Persistance, error)
InitPersistance initializes and loads the K/V datastore
func (*Persistance) ClosePersistance ¶
func (persistance *Persistance) ClosePersistance()
ClosePersistance closes the Persistance Datastore
func (*Persistance) IndexTask ¶
func (p *Persistance) IndexTask()
IndexTask set the Index in the Task K/V storage
func (*Persistance) ReadAllFiles ¶
func (p *Persistance) ReadAllFiles() (*map[string]string, error)
func (*Persistance) ReadFilePath ¶
func (p *Persistance) ReadFilePath(fileID string) (string, error)
ReadFilePath reads the Path of a given file in the datastore
func (*Persistance) ReadTask ¶
func (p *Persistance) ReadTask(taskId string) (*app.AtqTaskFull, error)
func (*Persistance) StoreFile ¶
func (p *Persistance) StoreFile(fileID, path string) error
StoreFile stores a file and its path in the Datastore
func (*Persistance) StoreTask ¶
func (p *Persistance) StoreTask(alias string, fileID *string, delay int) error
StoreTask stores a Task in the Datastore
func (*Persistance) StoreTaskMaster ¶
func (p *Persistance) StoreTaskMaster(taskId, serviceID, alias string) error
StoreTaskMaster persists the Master service ID inside taskId properties
func (*Persistance) StoreTaskWorker ¶
func (p *Persistance) StoreTaskWorker(taskId, serviceID, alias string) error
StoreTaskWorker persists the Master service ID inside taskId properties
Click to show internal directories.
Click to hide internal directories.