Documentation ¶
Index ¶
- Constants
- func NewFactoryRegistry() (factory *factoryRegistry)
- type DataHandler
- type DataPath
- type Factory
- type Helper
- func (helper *Helper) Config() common.DaemonConfig
- func (helper *Helper) Debug(msg string, keyvals ...interface{})
- func (helper *Helper) DeleteData(topic string, rowID string) error
- func (helper *Helper) Error(msg string, keyvals ...interface{})
- func (helper *Helper) GetCheckpoint(checkpoint interface{}) error
- func (helper *Helper) GetData(topic string, rowID string) (data []byte, err error)
- func (helper *Helper) GetDataList(topic string, handler DataHandler) error
- func (helper *Helper) GetObject(topic string, rowID string, data interface{}) error
- func (helper *Helper) GetRepository() Repository
- func (helper *Helper) ID() string
- func (helper *Helper) Info(msg string, keyvals ...interface{})
- func (helper *Helper) Job() job.Job
- func (helper *Helper) PutCheckpoint(checkpoint interface{}) error
- func (helper *Helper) PutData(topic string, rowID string, data []byte) error
- func (helper *Helper) PutDataFullPath(fullPath string, data []byte) error
- func (helper *Helper) PutObject(topic string, rowID string, data interface{}) error
- func (helper *Helper) Space() string
- type Manager
- func (manager *Manager) ContainsWorker(id string) bool
- func (manager *Manager) GetRepository() Repository
- func (manager *Manager) GetWorker(id string) Worker
- func (manager *Manager) RegisterWorkerFactory(factory Factory) error
- func (manager *Manager) SetJobs(jobs []job.Job)
- func (manager *Manager) Start()
- type Repository
- type Worker
Constants ¶
View Source
const ( PathCheckpoint = "chkpnt" // PatternPathData : data/{jobID}/{topic} PatternPathJobTopicData = "data/%s/%s" )
View Source
const (
SpaceDefaultWorker = "daemon-data"
)
Variables ¶
This section is empty.
Functions ¶
func NewFactoryRegistry ¶
func NewFactoryRegistry() (factory *factoryRegistry)
NewAbstractWorkerFactory create AbstractWorkerFactory
Types ¶
type DataHandler ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper ..
func NewHelper ¶
func NewHelper(space string, config common.DaemonConfig, logger log.Logger, job job.Job, dao Repository) *Helper
NewHelper ..
func (*Helper) DeleteData ¶
DeleteData ..
func (*Helper) GetCheckpoint ¶
GetCheckpoint ..
func (*Helper) GetDataList ¶
func (helper *Helper) GetDataList(topic string, handler DataHandler) error
GetDataList ..
func (*Helper) GetRepository ¶
func (helper *Helper) GetRepository() Repository
Config get worker's Repository
func (*Helper) PutCheckpoint ¶
PutCheckpoint ..
func (*Helper) PutDataFullPath ¶
PutDataFullPath ..
type Manager ¶
Manager manager for jobs
func NewManager ¶
func NewManager(context common.Context, spaceRegistry types.SpaceRegistry) *Manager
NewManager ..
func (*Manager) ContainsWorker ¶
ContainsWorker if worker id is registered.
func (*Manager) GetRepository ¶
func (manager *Manager) GetRepository() Repository
func (*Manager) RegisterWorkerFactory ¶
type Repository ¶
type Repository interface { PutCheckpoint(jobID string, checkpoint interface{}) error GetCheckpoint(jobID string, checkpoint interface{}) error PutData(space string, jobID string, topic string, rowID string, data []byte) error PutObject(space string, jobID string, topic string, rowID string, data interface{}) error GetData(space string, jobID string, topic string, rowID string) (data []byte, err error) GetObject(space string, jobID string, topic string, rowID string, data interface{}) error DeleteData(space string, jobID string, topic string, rowID string) error GetDataWithTopic(space string, jobID string, topic string, handler DataHandler) error PutDataFullPath(space string, path string, data []byte) error PutObjectFullPath(space string, path string, data interface{}) error GetDataFullPath(space string, path string) (data []byte, err error) GetObjectFullPath(space string, path string, data interface{}) (err error) DeleteDataFullPath(space string, path string) error }
func NewRepository ¶
func NewRepository(config common.DaemonConfig, logger log.Logger, client types.Client) Repository
Click to show internal directories.
Click to hide internal directories.