Documentation
¶
Index ¶
- func GetTimerPartitionsInVbs(vbs []uint16, numVbs, numTimerPartitions uint16) ([]uint16, []uint16)
- func InitWorkerDetails() *workerDetails
- func NewAllocatorWithContext(ctx context.Context, logPrefix string, keyspace application.Keyspace, ...) *allocator
- func NewBytesStats() *bytesStats
- func NewMsgBuffer(version uint32, instanceID []byte, runtimeSystem RuntimeSystem) *msgBuffer
- type Config
- type FilterInterface
- type Ownership
- type RuntimeSystem
- type StatsHandler
- type SystemResourceDetails
- type VbHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimerPartitionsInVbs ¶
func InitWorkerDetails ¶
func InitWorkerDetails() *workerDetails
Concurency should be controlled by caller
func NewAllocatorWithContext ¶
func NewBytesStats ¶
func NewBytesStats() *bytesStats
func NewMsgBuffer ¶
func NewMsgBuffer(version uint32, instanceID []byte, runtimeSystem RuntimeSystem) *msgBuffer
Types ¶
type Config ¶
type Config struct { Version uint32 FuncID uint16 TenantID string AppLocation application.AppLocation ConfiguredVbs uint16 InstanceID []byte DcpType serverConfig.DeploymentMode HandlerSettings application.HandlerSettings MetaInfo application.MetaInfo RuntimeSystem RuntimeSystem OwnershipRoutine Ownership CheckpointManager checkpointManager.Checkpoint Pool eventPool.ManagerPool StatsHandler StatsHandler SystemResourceDetails SystemResourceDetails Filter FilterInterface }
type FilterInterface ¶
type FilterInterface interface { CheckAndGetEventsInternalDetails(msg *dcpMessage.DcpEvent) (*checkpointManager.ParsedInternalDetails, bool) IsTrapEvent() (RuntimeSystem, bool) }
type Ownership ¶
type Ownership interface {
GetVbMap(version string, keyspaceInfo *application.KeyspaceInfo, id uint16, numVb, timerVbs uint16, appLocation application.AppLocation) (string, []uint16, error)
}
type RuntimeSystem ¶
type RuntimeSystem interface { GetProcessDetails() processManager.ProcessDetails WriteDcpMessage(version uint32, buffer *bytes.Buffer, opcode uint8, workerID uint8, instanceID []byte, msg *dcpMessage.DcpEvent, internalInfo *checkpointManager.ParsedInternalDetails) int32 FlushMessage(version uint32, buffer *bytes.Buffer) VbSettings(version uint32, opcode uint8, handlerID []byte, key interface{}, value interface{}) }
type StatsHandler ¶
type SystemResourceDetails ¶
type SystemResourceDetails interface {
MemRequiredPerThread(application.KeyspaceInfo) float64
}
type VbHandler ¶
type VbHandler interface { // GetHighSeqNum returns the high seq number of the owned vbs GetHighSeqNum() map[uint16]uint64 // RefreshSystemResourceLimits refreshes the system resource limits RefreshSystemResourceLimits() GetRuntimeStats() common.StatsInterface // NotifyOwnershipChange notifies the new vb map. Returns newly added and closed vbs NotifyOwnershipChange(version string) (vbMapVersion string, newVbs []uint16, closedVbs []uint16, notFullyOwned []uint16, err error) // VbHandlerSnapshot returns the still to be owned and closed vbs VbHandlerSnapshot(appProgress *common.AppRebalanceProgress) // AddVb will add it to the requester map. Returns how many remained to own // NotifyOwnershipChange should be called before AddVb AddVb(vb uint16, vbBlob *checkpointManager.VbBlob) int // CloseVb will close the requester and filter out any mutations related to this vb // Returns how many remained to be closed // NotifyOwnershipChange should be called before CloseVb CloseVb(vb uint16) int // AckMessages notes how many msgs and there bytes are processed by RuntimeSystem AckMessages(value []byte) (int, int) // Close closes all the vbs and returns how many ownership is closed Close() []uint16 }
func NewDummyVbHandler ¶
func NewDummyVbHandler() VbHandler
func NewVbHandler ¶
Click to show internal directories.
Click to hide internal directories.