walserver

package
v0.0.0-...-980bd36 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 37 Imported by: 0 modules, 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 walserver implements the Klio server infrastructure

Index

Constants

This section is empty.

Variables

View Source
var ErrIncoherentMetadata = errors.New("incoherent cluster metadata")

ErrIncoherentMetadata happens when the cluster metadata is incoherent or not unmarshallable.

View Source
var (

	// ErrParsingClientCACertificate is raised when we couldn't parse
	// the client CA certificate file.
	ErrParsingClientCACertificate = errors.New("parsing client CA certificate file failed")
)

Functions

func GetClusterRetentionPolicy

func GetClusterRetentionPolicy(
	ctx context.Context, conn *repository.Connection, clusterName string,
) (*grpc.RetentionPolicy, error)

GetClusterRetentionPolicy reads the retention policy stored for clusterName in conn, the WAL repository backing a WAL server. Exported so the retention sweep (internal/retention) can read it in-process, sharing the same tier1 WAL repository as this server, without a gRPC round trip.

func Start

func Start(
	ctx context.Context,
	repoConnection *repository.Connection,
	walServerConfiguration *config.WalServerConfig,
	tlsConfiguration *config.TLSConfig,
	queueURL string,
	tier opentelemetry.Tier,
) error

Start starts a WAL server.

Types

type Implementation

type Implementation struct {
	grpc.UnimplementedWALServer
	// contains filtered or unexported fields
}

Implementation is the implementation of the WAL server.

func New

func New(
	opts Options,
) *Implementation

New creates a new WAL server implementation.

func (*Implementation) CloseBackup

func (w *Implementation) CloseBackup(
	ctx context.Context,
	request *grpc.CloseBackupRequest,
) (*grpc.CloseBackupResult, error)

CloseBackup implements the CloseBackup GRPC call.

func (*Implementation) Get

Get implements the relative GRPC call.

func (*Implementation) GetMetadata

GetMetadata implements the GetMetadata GRPC call.

func (*Implementation) GetRetentionPolicy

func (w *Implementation) GetRetentionPolicy(
	ctx context.Context, request *grpc.GetRetentionPolicyRequest,
) (*grpc.GetRetentionPolicyResult, error)

GetRetentionPolicy implements the GetRetentionPolicy GRPC call.

func (*Implementation) Put

func (w *Implementation) Put(req grpc.WAL_PutServer) error

Put uploads a new WAL to the data store.

func (*Implementation) RequestWALStart

RequestWALStart implements the corresponding GRPC call, validating the WAL streaming request of a client.

func (*Implementation) ResetWALStream

ResetWALStream implements the GRPC call.

func (*Implementation) SetRetentionPolicy

func (w *Implementation) SetRetentionPolicy(
	ctx context.Context, request *grpc.SetRetentionPolicyRequest,
) (*grpc.SetRetentionPolicyResult, error)

SetRetentionPolicy implements the SetRetentionPolicy GRPC call.

type Options

type Options struct {
	// Connection is the repository to be used with this WAL server
	Connection *repository.Connection

	// ReadOnly is true when the repository should deny any write attempt
	ReadOnly bool

	// Queue is the connection to the Queue
	Queue *queue.Conn

	// Tier is the storage tier this WAL server serves, used to tag its metrics
	// (a tier-1 server reads/writes local disk; a tier-2 server serves WAL from
	// remote object storage).
	Tier opentelemetry.Tier
}

Options is the structure describing the behavior of a WAL server.

Jump to

Keyboard shortcuts

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