Documentation ¶
Index ¶
- type Container
- type ContainerQueue
- func (q *ContainerQueue) DequeueFromQueue() *ContainerSpec
- func (q *ContainerQueue) DequeueFromRunning() *ContainerSpec
- func (q *ContainerQueue) EnqueueFromQueue(cSpec *ContainerSpec) error
- func (q *ContainerQueue) EnqueueFromRunning(cSpec *ContainerSpec) error
- func (q *ContainerQueue) GetLimitContainerCount() int
- func (q *ContainerQueue) LenQueue() int
- func (q *ContainerQueue) LenRunning() int
- type ContainerSpec
- type Controller
- func (c *Controller) CountRunningCurrentScraper(id string) (int, error)
- func (c *Controller) CountRunningCurrentSimilarity(id string) (int, error)
- func (c *Controller) CreateAnalyzerService(workerId, jobId, keyword string, dbConfig *db.DBConfig) (error, bool)
- func (c *Controller) CreateScraperService(workerId string, jobId string, keyword string, token string, ...) (error, bool)
- func (c *Controller) CreateSimilarityService(workerId string, jobId string, dbConfig *db.DBConfig) (error, bool)
- func (c *Controller) RemoveAnalyzer(id string) error
- func (c *Controller) RemoveScraper(id string) error
- func (c *Controller) RemoveSimilarity(id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface { BuildImage() error RunImage(respID string) error StopImage(respID string) error CreateNewScraper(workerId string, jobId string, keyword string, dbConfig *db.DBConfig) error CreateNewAnalyzer(workerId string, keyword string, dbConfig *db.DBConfig) error CreateNewSimilarity(workerId string, dbConfig *db.DBConfig) error EnsureImage(image string) error RemoveScraper(id string) error RemoveAnalyzer(id string) error }
type ContainerQueue ¶
type ContainerQueue struct {
// contains filtered or unexported fields
}
func NewContainerQueue ¶
func NewContainerQueue(length int, containerMaximum int) *ContainerQueue
func (*ContainerQueue) DequeueFromQueue ¶
func (q *ContainerQueue) DequeueFromQueue() *ContainerSpec
func (*ContainerQueue) DequeueFromRunning ¶
func (q *ContainerQueue) DequeueFromRunning() *ContainerSpec
func (*ContainerQueue) EnqueueFromQueue ¶
func (q *ContainerQueue) EnqueueFromQueue(cSpec *ContainerSpec) error
func (*ContainerQueue) EnqueueFromRunning ¶
func (q *ContainerQueue) EnqueueFromRunning(cSpec *ContainerSpec) error
func (*ContainerQueue) GetLimitContainerCount ¶
func (q *ContainerQueue) GetLimitContainerCount() int
func (*ContainerQueue) LenQueue ¶
func (q *ContainerQueue) LenQueue() int
func (*ContainerQueue) LenRunning ¶
func (q *ContainerQueue) LenRunning() int
type ContainerSpec ¶
type Controller ¶
type Controller struct { Container // contains filtered or unexported fields }
func NewController ¶
func NewController(cQueue *ContainerQueue) (controller *Controller, err error)
func (*Controller) CountRunningCurrentScraper ¶
func (c *Controller) CountRunningCurrentScraper(id string) (int, error)
func (*Controller) CountRunningCurrentSimilarity ¶
func (c *Controller) CountRunningCurrentSimilarity(id string) (int, error)
func (*Controller) CreateAnalyzerService ¶
func (*Controller) CreateScraperService ¶
func (*Controller) CreateSimilarityService ¶
func (*Controller) RemoveAnalyzer ¶
func (c *Controller) RemoveAnalyzer(id string) error
func (*Controller) RemoveScraper ¶
func (c *Controller) RemoveScraper(id string) error
func (*Controller) RemoveSimilarity ¶
func (c *Controller) RemoveSimilarity(id string) error
Click to show internal directories.
Click to hide internal directories.