Documentation
¶
Index ¶
- type Engine
- type Option
- func WithBitmapMaxCacheBytes(value uint64) Option
- func WithBitmapWorkers(value int) Option
- func WithClickhouse(address, name, password string) Option
- func WithRetryOption(value time.Duration) Option
- func WithShardBitmapBytes(value uint64) Option
- func WithSnapshotTTL(value uint32) Option
- func WithTempKeyTTL(value uint32) Option
- func WithWorkerCreateCount(value uint64) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
// Start start the engine
Start() error
// Stop stop the engine
Stop() error
// StartInstance start instance, an instance may contain a lot of people,
// so an instance will be divided into many shards, each shard handles some
// people's events.
StartInstance(workflow metapb.Workflow, loader metapb.BMLoader, crowd []byte) (uint64, error)
// LastInstance returns last instance
LastInstance(id uint64) (*metapb.WorkflowInstance, error)
// HistoryInstance returens a workflow instance snapshot
HistoryInstance(uint64, uint64) (*metapb.WorkflowInstanceSnapshot, error)
// UpdateCrowd update instance crowd
UpdateCrowd(id uint64, loader metapb.BMLoader, crowdMeta []byte) error
// UpdateInstance update running workflow
UpdateWorkflow(workflow metapb.Workflow) error
// StopInstance stop instance
StopInstance(id uint64) error
// InstanceCountState returns instance count state
InstanceCountState(id uint64) (metapb.InstanceCountState, error)
// InstanceStepState returns instance step state
InstanceStepState(id uint64, name string) (metapb.StepState, error)
// TenantInit init tenant, and create the tenant input and output queue
TenantInit(metapb.Tenant) error
// Notifier returns notifier
Notifier() notify.Notifier
// Storage returns storage
Storage() storage.Storage
// Service returns a crm service
Service() crm.Service
// AddCronJob add cron job
AddCronJob(string, func()) (cron.EntryID, error)
// StopCronJob stop the cron job
StopCronJob(cron.EntryID)
}
Engine the engine maintains all state information
type Option ¶
type Option func(*options)
Option engine option
func WithBitmapMaxCacheBytes ¶
WithBitmapMaxCacheBytes set bitmap max cache bytes option
func WithBitmapWorkers ¶
WithBitmapWorkers set bitmap workers option
func WithClickhouse ¶
WithClickhouse set clickhouse option
func WithRetryOption ¶
WithRetryOption set retry option
func WithShardBitmapBytes ¶
WithShardBitmapBytes set bytes of shard bitmap option
func WithSnapshotTTL ¶
WithSnapshotTTL set snapshot ttl option
func WithWorkerCreateCount ¶
WithWorkerCreateCount set worker create count option
Click to show internal directories.
Click to hide internal directories.