inspector

package
v0.0.0-...-34e0b2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SealOperationInspector

type SealOperationInspector interface {
	// TriggerSealWaited triggers the seal waited segment.
	TriggerSealWaited(ctx context.Context, pchannel string) error

	// RegisterPChannelManager registers a pchannel manager.
	RegsiterPChannelManager(m SealOperator)

	// UnregisterPChannelManager unregisters a pchannel manager.
	UnregisterPChannelManager(m SealOperator)

	// Close closes the inspector.
	Close()
}

SealOperationInspector is the inspector to check if a segment should be sealed or not.

func NewSealedInspector

func NewSealedInspector(n *stats.SealSignalNotifier) SealOperationInspector

NewSealedInspector creates a new seal inspector.

type SealOperator

type SealOperator interface {
	// Channel returns the pchannel info.
	Channel() types.PChannelInfo

	// TryToSealSegments tries to seal the segment, if info is given, seal operation is only applied to related partitions and waiting seal segments,
	// Otherwise, seal operation is applied to all partitions.
	// Return false if there's some segment wait for seal but not sealed.
	TryToSealSegments(ctx context.Context, infos ...stats.SegmentBelongs)

	// TryToSealWaitedSegment tries to seal the wait for sealing segment.
	// Return false if there's some segment wait for seal but not sealed.
	TryToSealWaitedSegment(ctx context.Context)

	// IsNoWaitSeal returns whether there's no segment wait for seal.
	IsNoWaitSeal() bool
}

SealOperator is a segment seal operator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL