promotiontoken

package
v1.26.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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