Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultLSMCompactionInterval = 3 * time.Second DefaultMemtableFlushInterval = 100 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CycleManager ¶
func (*CycleManager) Running ¶
func (c *CycleManager) Running() bool
func (*CycleManager) Start ¶
func (c *CycleManager) Start()
Starts instance, does not block Does nothing if instance is already started
func (*CycleManager) Stop ¶
func (c *CycleManager) Stop(ctx context.Context) (stopResult chan bool)
Stops running instance, does not block Returns channel with final stop result - true / false
If given context is cancelled before it is handled by stop logic, instance is not stopped If called multiple times, all contexts have to be cancelled to cancel stop (any valid will result in stopping instance) stopResult is the same (consistent) for multiple calls
func (*CycleManager) StopAndWait ¶
func (c *CycleManager) StopAndWait(ctx context.Context) error
Stops running instance, waits for stop to occur or context to expire (which comes first) Returns error if instance was not stopped
Click to show internal directories.
Click to hide internal directories.