dragon

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetLockCommand          = "get"
	ReleaseLockCommand      = "release"
	LockSMResultTrue   byte = 1
	LockSMResultFalse  byte = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dragon

type Dragon struct {
	// contains filtered or unexported fields
}

func NewDragon

func NewDragon(cnf conf.Config) (*Dragon, error)

func (*Dragon) AddToDeleteBatch

func (d *Dragon) AddToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error

func (*Dragon) CreateSnapshot

func (d *Dragon) CreateSnapshot() (cluster.Snapshot, error)

func (*Dragon) DeleteAllDataInRangeForAllShardsLocally

func (d *Dragon) DeleteAllDataInRangeForAllShardsLocally(startPrefix []byte, endPrefix []byte) error

func (*Dragon) DeleteAllDataInRangeForShardLocally

func (d *Dragon) DeleteAllDataInRangeForShardLocally(shardID uint64, startPrefix []byte, endPrefix []byte) error

func (*Dragon) ExecutePingLookup

func (d *Dragon) ExecutePingLookup(shardID uint64, request []byte) error

func (*Dragon) ExecuteRemotePullQuery

func (d *Dragon) ExecuteRemotePullQuery(queryInfo *cluster.QueryExecutionInfo, rowsFactory *common.RowsFactory) (*common.Rows, error)

func (*Dragon) GenerateClusterSequence

func (d *Dragon) GenerateClusterSequence(sequenceName string) (uint64, error)

func (*Dragon) GetAllShardIDs

func (d *Dragon) GetAllShardIDs() []uint64

func (*Dragon) GetLocalShardIDs

func (d *Dragon) GetLocalShardIDs() []uint64

func (*Dragon) GetLock

func (d *Dragon) GetLock(prefix string) (bool, error)

func (*Dragon) GetNodeID

func (d *Dragon) GetNodeID() int

func (*Dragon) GetRemoteProposeHandler

func (d *Dragon) GetRemoteProposeHandler() remoting.ClusterMessageHandler

func (*Dragon) GetRemoteReadHandler

func (d *Dragon) GetRemoteReadHandler() remoting.ClusterMessageHandler

func (*Dragon) LocalGet

func (d *Dragon) LocalGet(key []byte) ([]byte, error)

func (*Dragon) LocalScan

func (d *Dragon) LocalScan(startKeyPrefix []byte, endKeyPrefix []byte, limit int) ([]cluster.KVPair, error)

func (*Dragon) LocalScanWithSnapshot

func (d *Dragon) LocalScanWithSnapshot(sn cluster.Snapshot, startKeyPrefix []byte, endKeyPrefix []byte, limit int) ([]cluster.KVPair, error)

func (*Dragon) PostStartChecks

func (d *Dragon) PostStartChecks(queryExec common.SimpleQueryExec) error

func (*Dragon) RegisterShardListenerFactory

func (d *Dragon) RegisterShardListenerFactory(factory cluster.ShardListenerFactory)

func (*Dragon) ReleaseLock

func (d *Dragon) ReleaseLock(prefix string) (bool, error)

func (*Dragon) RemoveToDeleteBatch

func (d *Dragon) RemoveToDeleteBatch(deleteBatch *cluster.ToDeleteBatch) error

func (*Dragon) SetRemoteQueryExecutionCallback

func (d *Dragon) SetRemoteQueryExecutionCallback(callback cluster.RemoteQueryExecutionCallback)

func (*Dragon) Start

func (d *Dragon) Start() error

func (*Dragon) Stop

func (d *Dragon) Stop() error

func (*Dragon) WriteBatch

func (d *Dragon) WriteBatch(batch *cluster.WriteBatch) error

func (*Dragon) WriteBatchLocally

func (d *Dragon) WriteBatchLocally(batch *cluster.WriteBatch) error

func (*Dragon) WriteForwardBatch

func (d *Dragon) WriteForwardBatch(batch *cluster.WriteBatch) error

type ShardOnDiskStateMachine

type ShardOnDiskStateMachine struct {
	// contains filtered or unexported fields
}

func (*ShardOnDiskStateMachine) Close

func (s *ShardOnDiskStateMachine) Close() error

func (*ShardOnDiskStateMachine) Lookup

func (s *ShardOnDiskStateMachine) Lookup(i interface{}) (interface{}, error)

func (*ShardOnDiskStateMachine) Open

func (s *ShardOnDiskStateMachine) Open(stopc <-chan struct{}) (uint64, error)

func (*ShardOnDiskStateMachine) PrepareSnapshot

func (s *ShardOnDiskStateMachine) PrepareSnapshot() (interface{}, error)

func (*ShardOnDiskStateMachine) RecoverFromSnapshot

func (s *ShardOnDiskStateMachine) RecoverFromSnapshot(reader io.Reader, i <-chan struct{}) error

func (*ShardOnDiskStateMachine) SaveSnapshot

func (s *ShardOnDiskStateMachine) SaveSnapshot(i interface{}, writer io.Writer, _ <-chan struct{}) error

func (*ShardOnDiskStateMachine) Sync

func (s *ShardOnDiskStateMachine) Sync() error

func (*ShardOnDiskStateMachine) Update

Jump to

Keyboard shortcuts

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