Documentation ¶
Index ¶
- type BaseContainerPool
- func (b *BaseContainerPool) Contain(uniqueId string) bool
- func (b *BaseContainerPool) DestroyByInstance(jobInstanceId int64) bool
- func (b *BaseContainerPool) Get(uniqueId string) Container
- func (b *BaseContainerPool) GetContainerMap() *sync.Map
- func (b *BaseContainerPool) GetContext() *jobcontext.JobContext
- func (b *BaseContainerPool) GetInstanceLock(jobInstanceId int64) interface{}
- func (b *BaseContainerPool) Put(uniqueId string, container Container)
- func (b *BaseContainerPool) ReleaseInstanceLock(jobInstanceId int64)
- func (b *BaseContainerPool) Remove(uniqueId string)
- func (b *BaseContainerPool) RemoveContext()
- func (b *BaseContainerPool) SetContext(jobContext *jobcontext.JobContext)
- func (b *BaseContainerPool) Submit(jobId int64, jobInstanceId int64, taskId int64, container Container, ...) error
- type Container
- type ContainerPool
- type ThreadContainer
- type ThreadContainerPool
- func (p *ThreadContainerPool) DestroyByInstance(jobInstanceId int64) bool
- func (p *ThreadContainerPool) GetContext() *jobcontext.JobContext
- func (p *ThreadContainerPool) GetInstanceLock(jobInstanceId int64) interface{}
- func (p *ThreadContainerPool) GetSharedThreadPool() *ants.Pool
- func (p *ThreadContainerPool) ReleaseInstanceLock(jobInstanceId int64)
- func (p *ThreadContainerPool) RemoveContext()
- func (p *ThreadContainerPool) SetContext(jobContext *jobcontext.JobContext)
- func (p *ThreadContainerPool) Submit(jobId, jobInstanceId, taskId int64, container Container, consumerSize int32) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseContainerPool ¶
type BaseContainerPool struct {
// contains filtered or unexported fields
}
func NewBaseContainerPool ¶
func NewBaseContainerPool() *BaseContainerPool
func (*BaseContainerPool) Contain ¶
func (b *BaseContainerPool) Contain(uniqueId string) bool
func (*BaseContainerPool) DestroyByInstance ¶
func (b *BaseContainerPool) DestroyByInstance(jobInstanceId int64) bool
func (*BaseContainerPool) Get ¶
func (b *BaseContainerPool) Get(uniqueId string) Container
func (*BaseContainerPool) GetContainerMap ¶
func (b *BaseContainerPool) GetContainerMap() *sync.Map
func (*BaseContainerPool) GetContext ¶
func (b *BaseContainerPool) GetContext() *jobcontext.JobContext
func (*BaseContainerPool) GetInstanceLock ¶
func (b *BaseContainerPool) GetInstanceLock(jobInstanceId int64) interface{}
func (*BaseContainerPool) Put ¶
func (b *BaseContainerPool) Put(uniqueId string, container Container)
func (*BaseContainerPool) ReleaseInstanceLock ¶
func (b *BaseContainerPool) ReleaseInstanceLock(jobInstanceId int64)
func (*BaseContainerPool) Remove ¶
func (b *BaseContainerPool) Remove(uniqueId string)
func (*BaseContainerPool) RemoveContext ¶
func (b *BaseContainerPool) RemoveContext()
func (*BaseContainerPool) SetContext ¶
func (b *BaseContainerPool) SetContext(jobContext *jobcontext.JobContext)
type ContainerPool ¶
type ContainerPool interface { Contain(uniqueId string) bool DestroyByInstance(jobInstanceId int64) bool Get(uniqueId string) Container GetContainerMap() *sync.Map // map[string]Container GetContext() *jobcontext.JobContext GetInstanceLock(jobInstanceId int64) interface{} Put(uniqueId string, container Container) ReleaseInstanceLock(jobInstanceId int64) Remove(uniqueId string) RemoveContext() SetContext(jobContext *jobcontext.JobContext) Submit(jobId int64, jobInstanceId int64, taskId int64, container Container, consumerSize int32) error }
type ThreadContainer ¶
type ThreadContainer struct {
// contains filtered or unexported fields
}
func NewThreadContainer ¶
func NewThreadContainer(jobCtx *jobcontext.JobContext, actorCtx actor.Context, containerPool ContainerPool) (*ThreadContainer, error)
func (*ThreadContainer) GetContext ¶
func (c *ThreadContainer) GetContext() *jobcontext.JobContext
func (*ThreadContainer) Kill ¶
func (c *ThreadContainer) Kill()
func (*ThreadContainer) Run ¶
func (c *ThreadContainer) Run()
func (*ThreadContainer) SetContext ¶
func (c *ThreadContainer) SetContext(context *jobcontext.JobContext)
func (*ThreadContainer) Start ¶
func (c *ThreadContainer) Start()
func (*ThreadContainer) Stop ¶
func (c *ThreadContainer) Stop()
type ThreadContainerPool ¶
type ThreadContainerPool struct { *BaseContainerPool // contains filtered or unexported fields }
func GetThreadContainerPool ¶
func GetThreadContainerPool() *ThreadContainerPool
func (*ThreadContainerPool) DestroyByInstance ¶
func (p *ThreadContainerPool) DestroyByInstance(jobInstanceId int64) bool
func (*ThreadContainerPool) GetContext ¶
func (p *ThreadContainerPool) GetContext() *jobcontext.JobContext
func (*ThreadContainerPool) GetInstanceLock ¶
func (p *ThreadContainerPool) GetInstanceLock(jobInstanceId int64) interface{}
func (*ThreadContainerPool) GetSharedThreadPool ¶
func (p *ThreadContainerPool) GetSharedThreadPool() *ants.Pool
func (*ThreadContainerPool) ReleaseInstanceLock ¶
func (p *ThreadContainerPool) ReleaseInstanceLock(jobInstanceId int64)
func (*ThreadContainerPool) RemoveContext ¶
func (p *ThreadContainerPool) RemoveContext()
func (*ThreadContainerPool) SetContext ¶
func (p *ThreadContainerPool) SetContext(jobContext *jobcontext.JobContext)
Click to show internal directories.
Click to hide internal directories.