promotiontoken

package
v1.27.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package promotiontoken : This package contains the promotion token related operations

Index

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

TokenContent returns the token content that caused the error

Jump to

Keyboard shortcuts

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