Documentation
¶
Overview ¶
Package promotiontoken : This package contains the promotion token related operations
Index ¶
- func ValidateAgainstInstanceStatus(promotionToken *utils.PgControldataTokenContent, ...) error
- func ValidateAgainstLSN(promotionToken *utils.PgControldataTokenContent, replayLSNString string) error
- func ValidateAgainstSystemIdentifier(promotionToken *utils.PgControldataTokenContent, ...) error
- func ValidateAgainstTimelineID(promotionToken *utils.PgControldataTokenContent, ...) error
- type TokenVerificationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAgainstInstanceStatus ¶
func ValidateAgainstInstanceStatus( promotionToken *utils.PgControldataTokenContent, currentSystemIdentifier string, currentTimelineIDString string, replayLSNString string, ) error
ValidateAgainstInstanceStatus checks if the promotion token is valid against the instance status
func ValidateAgainstLSN ¶
func ValidateAgainstLSN(promotionToken *utils.PgControldataTokenContent, replayLSNString string) error
ValidateAgainstLSN checks if the promotion token is valid against the last replay LSN
func ValidateAgainstSystemIdentifier ¶
func ValidateAgainstSystemIdentifier( promotionToken *utils.PgControldataTokenContent, currentSystemIdentifier string, ) error
ValidateAgainstSystemIdentifier checks if the promotion token is valid against the system identifier
func ValidateAgainstTimelineID ¶
func ValidateAgainstTimelineID( promotionToken *utils.PgControldataTokenContent, currentTimelineIDString string, ) error
ValidateAgainstTimelineID checks if the promotion token is valid against the timeline ID
Types ¶
type TokenVerificationError ¶
type TokenVerificationError struct {
// contains filtered or unexported fields
}
TokenVerificationError are raised when the promotion token does not correspond to the status of the current instance
func (*TokenVerificationError) Error ¶
func (e *TokenVerificationError) Error() string
Error implements the error interface
func (*TokenVerificationError) IsRetryable ¶
func (e *TokenVerificationError) IsRetryable() bool
IsRetryable is true when this condition is temporary and the calling code is expected to retry this operator in the future
func (*TokenVerificationError) TokenContent ¶
func (e *TokenVerificationError) TokenContent() *utils.PgControldataTokenContent
TokenContent returns the token content that caused the error