Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteDebuggerCallback(appLocation application.AppLocation) error
- func DeleteDebuggerCheckpoint(collectionHandle *gocb.Collection, observer notifier.Observer, ...) error
- func DeleteOnDeployCheckpoint(appLocation application.AppLocation, collectionHandle *gocb.Collection, ...) error
- func GetBucketObject(cluster *gocb.Cluster, observer notifier.Observer, bucketName string) (bucket *gocb.Bucket, err error)
- func GetBucketObjectWithRetry(cluster *gocb.Cluster, retryCount int, observer notifier.Observer, ...) (bucket *gocb.Bucket, err error)
- func GetCheckpointKeyTemplate(appId uint32) string
- func GetCollectionHandle(bucket *gocb.Bucket, keyspace application.Keyspace) (collection *gocb.Collection)
- func GetDebuggerURL(collectionHandle *gocb.Collection, observer notifier.Observer, ...) (string, error)
- func GetGocbClusterObject(clusterConfig *common.ClusterSettings, observer notifier.Observer, ...) (cluster *gocb.Cluster)
- func NewVbBlobInternal(key string, observer notifier.Observer, checkpointConfig *CheckpointConfig, ...) (*vbBlobInternal, string, error)
- func SetDebuggerCallback(appLocation application.AppLocation, value []byte) error
- func WriteDebuggerCheckpoint(collectionHandle *gocb.Collection, observer notifier.Observer, ...) (string, error)
- func WriteDebuggerUrl(collectionHandle *gocb.Collection, observer notifier.Observer, ...) error
- type BucketCheckpoint
- type Checkpoint
- func NewCheckpointManager(cc CheckpointConfig, cluster *gocb.Cluster, ...) Checkpoint
- func NewCheckpointManagerForKeyspace(cc CheckpointConfig, interruptCallback InterruptFunction, bucket *gocb.Bucket, ...) Checkpoint
- func NewCheckpointManagerForKeyspaceWithContext(ctx context.Context, cc CheckpointConfig, interruptCallback InterruptFunction, ...) Checkpoint
- func NewDummyCheckpointManager() Checkpoint
- type CheckpointConfig
- type GocbLogger
- type InterruptFunction
- type OnDeployCheckpoint
- type OnDeployState
- type OwnMsg
- type ParsedInternalDetails
- type VbBlob
Constants ¶
View Source
const ( Checkpoint_Vbuuid checkpointField = iota Checkpoint_ManifestID Checkpoint_FailoverLog Checkpoint_ProcessedSeqNum Checkpoint_SeqNum )
View Source
const ( DebuggerLeader leaderType = iota OnDeployLeader )
Variables ¶
View Source
var (
ErrDocumentNotFound = errors.New("document not found")
)
Functions ¶
func DeleteDebuggerCallback ¶
func DeleteDebuggerCallback(appLocation application.AppLocation) error
func DeleteDebuggerCheckpoint ¶
func DeleteDebuggerCheckpoint(collectionHandle *gocb.Collection, observer notifier.Observer, keyspace application.Keyspace, id uint32, instanceID string, appLocation application.AppLocation) error
func DeleteOnDeployCheckpoint ¶
func DeleteOnDeployCheckpoint(appLocation application.AppLocation, collectionHandle *gocb.Collection, observer notifier.Observer, keyspace application.Keyspace) error
func GetBucketObject ¶
func GetBucketObjectWithRetry ¶
func GetBucketObjectWithRetry(cluster *gocb.Cluster, retryCount int, observer notifier.Observer, bucketName string) (bucket *gocb.Bucket, err error)
negetive retry means infinite retry
func GetCheckpointKeyTemplate ¶
GetCheckpointKeyTemplate returns checkpoint blob key
func GetCollectionHandle ¶
func GetCollectionHandle(bucket *gocb.Bucket, keyspace application.Keyspace) (collection *gocb.Collection)
func GetDebuggerURL ¶
func GetDebuggerURL(collectionHandle *gocb.Collection, observer notifier.Observer, keyspace application.Keyspace, id uint32, instanceID string, appLocation application.AppLocation) (string, error)
func GetGocbClusterObject ¶
func GetGocbClusterObject(clusterConfig *common.ClusterSettings, observer notifier.Observer, globalStatsCounter *common.GlobalStatsCounter) (cluster *gocb.Cluster)
func NewVbBlobInternal ¶
func NewVbBlobInternal(key string, observer notifier.Observer, checkpointConfig *CheckpointConfig, collectionHandler collectionHandle, forced bool) (*vbBlobInternal, string, error)
Get the ownership of the blob
func SetDebuggerCallback ¶
func SetDebuggerCallback(appLocation application.AppLocation, value []byte) error
func WriteDebuggerCheckpoint ¶
func WriteDebuggerCheckpoint(collectionHandle *gocb.Collection, observer notifier.Observer, keyspace application.Keyspace, id uint32, instanceID string, appLocation application.AppLocation) (string, error)
func WriteDebuggerUrl ¶
func WriteDebuggerUrl(collectionHandle *gocb.Collection, observer notifier.Observer, keyspace application.Keyspace, id uint32, instanceID string, appLocation application.AppLocation, url string) error
Types ¶
type BucketCheckpoint ¶
type BucketCheckpoint interface {
GetCheckpointManager(appId uint32, appInstanceID string, interruptCallback InterruptFunction, appLocation application.AppLocation, keyspace application.Keyspace) Checkpoint
TlsSettingChange(gocbCluster *gocb.Cluster)
CloseBucketManager()
}
func NewBucketCheckpointManager ¶
func NewBucketCheckpointManager(clusterSettings *common.ClusterSettings, bucketName string, gocbCluster *gocb.Cluster, observer notifier.Observer, broadcaster common.Broadcaster) BucketCheckpoint
type Checkpoint ¶
type Checkpoint interface {
OwnershipSnapshot(*common.AppRebalanceProgress)
OwnVbCheckpoint(vb uint16)
UpdateVal(vb uint16, field checkpointField, value interface{})
StopCheckpoint(vb uint16)
CloseCheckpointManager()
DeleteCheckpointBlob(vb uint16) error
DeleteKeys(deleteKeys []string)
SyncUpsertCheckpoint(vb uint16, vbBlob *VbBlob) error
TlsSettingChange(*gocb.Bucket)
WaitTillAllGiveUp(vbs uint16)
GetAllCheckpoints(appId uint32) (*gocb.ScanResult, error)
GetRuntimeStats() common.StatsInterface
TryTobeLeader(leaderType leaderType, seq uint32) (bool, error)
PollUntilOnDeployCompletes() *OnDeployCheckpoint
PublishOnDeployStatus(status OnDeployState) *OnDeployCheckpoint
}
func NewCheckpointManager ¶
func NewCheckpointManager(cc CheckpointConfig, cluster *gocb.Cluster, clusterConfig *common.ClusterSettings, interruptCallback InterruptFunction, observer notifier.Observer, broadcaster common.Broadcaster) Checkpoint
func NewCheckpointManagerForKeyspace ¶
func NewCheckpointManagerForKeyspace(cc CheckpointConfig, interruptCallback InterruptFunction, bucket *gocb.Bucket, observer notifier.Observer, broadcaster common.Broadcaster) Checkpoint
func NewCheckpointManagerForKeyspaceWithContext ¶
func NewCheckpointManagerForKeyspaceWithContext(ctx context.Context, cc CheckpointConfig, interruptCallback InterruptFunction, bucket *gocb.Bucket, observer notifier.Observer, broadcaster common.Broadcaster) Checkpoint
func NewDummyCheckpointManager ¶
func NewDummyCheckpointManager() Checkpoint
type CheckpointConfig ¶
type CheckpointConfig struct {
AppLocation application.AppLocation
Keyspace application.Keyspace
AppInstance string
AppID uint32
LocalAddress string
KvPort string
OwnerNodeUUID string
}
func (CheckpointConfig) String ¶
func (c CheckpointConfig) String() string
type GocbLogger ¶
type GocbLogger struct{}
type InterruptFunction ¶
type OnDeployCheckpoint ¶
type OnDeployCheckpoint struct {
NodeUUID string `json:"node_uuid"`
Seq uint32 `json:"seq"`
Status OnDeployState `json:"on_deploy_status"`
}
func ReadOnDeployCheckpoint ¶
func ReadOnDeployCheckpoint(appLocation application.AppLocation, collectionHandle *gocb.Collection, observer notifier.Observer, keyspace application.Keyspace) (*OnDeployCheckpoint, error)
type OnDeployState ¶
type OnDeployState string
Ondeploy checkpoint functions
const ( PendingOnDeploy OnDeployState = "Pending" FinishedOnDeploy OnDeployState = "Finished" FailedStateOnDeploy OnDeployState = "Failed" )
type ParsedInternalDetails ¶
Click to show internal directories.
Click to hide internal directories.