respserver

package
v1.0.63 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFingerprintFenced           = errors.New("fingerprint is fenced")
	ErrInvalidSubscriptionLifetime = errors.New("invalid subscription lifetime")
)

Functions

This section is empty.

Types

type FingerprintRegistry added in v1.0.63

type FingerprintRegistry struct {
	// contains filtered or unexported fields
}

FingerprintRegistry tracks exactly one CPA membership lifetime per key.

func NewFingerprintRegistry added in v1.0.63

func NewFingerprintRegistry() *FingerprintRegistry

NewFingerprintRegistry creates an empty fingerprint lifetime registry.

func (*FingerprintRegistry) Accept added in v1.0.63

Accept registers a newly accepted connection with its immutable accept lifetime.

func (*FingerprintRegistry) Fence added in v1.0.63

func (r *FingerprintRegistry) Fence(ctx context.Context, lifetime cluster.ConnectionLifetime, revision int64) error

Fence cancels all connections for an exact membership lifetime and waits for all work to drain.

func (*FingerprintRegistry) FenceAndAcknowledge added in v1.0.63

func (r *FingerprintRegistry) FenceAndAcknowledge(ctx context.Context, lifetime cluster.ConnectionLifetime, revision int64, acknowledge func() error) error

FenceAndAcknowledge keeps the exact lifetime entry fenced while acknowledge persists its drain acknowledgement.

func (*FingerprintRegistry) LatestFenceRevision added in v1.0.63

func (r *FingerprintRegistry) LatestFenceRevision(lifetime cluster.ConnectionLifetime) int64

LatestFenceRevision returns the latest fence revision for an exact lifetime.

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(addr string, runtime *home.Runtime) *Server

New creates a new.

func (*Server) ApplyInFlightConfig added in v1.0.63

func (s *Server) ApplyInFlightConfig(cfg config.CredentialInFlightConfig) error

ApplyInFlightConfig validates and atomically applies in-flight observation limits.

func (*Server) FenceFingerprint added in v1.0.63

func (s *Server) FenceFingerprint(ctx context.Context, lifetime cluster.ConnectionLifetime, revision int64, acknowledge func() error) error

FenceFingerprint drains an exact lifetime before persisting its acknowledgement.

func (*Server) HandleConn

func (s *Server) HandleConn(ctx context.Context, conn net.Conn)

HandleConn handles handle conn.

func (*Server) SetClusterHandler

func (s *Server) SetClusterHandler(handler clusterHandler)

SetClusterHandler sets a cluster handler.

func (*Server) SetConcurrencyReleaseStore added in v1.0.63

func (s *Server) SetConcurrencyReleaseStore(store dispatch.ConcurrencyReleaseStore)

SetConcurrencyReleaseStore sets the repository used to apply cumulative limiter releases.

func (*Server) SetInFlightSnapshotStore added in v1.0.63

func (s *Server) SetInFlightSnapshotStore(store dispatch.InFlightSnapshotStore)

SetInFlightSnapshotStore sets the repository used to ingest in-flight observation frames.

type TrackedConnection added in v1.0.63

type TrackedConnection struct {
	// contains filtered or unexported fields
}

TrackedConnection owns a cancellable connection lifetime.

func (*TrackedConnection) AttachSubscriptionLifetime added in v1.0.63

func (c *TrackedConnection) AttachSubscriptionLifetime(lifetime cluster.ConnectionLifetime) error

AttachSubscriptionLifetime moves bootstrap tracking to a non-controlled subscription lifetime.

func (*TrackedConnection) BeginHandler added in v1.0.63

func (c *TrackedConnection) BeginHandler() (func(), error)

BeginHandler prevents a fence acknowledgement until the returned callback runs.

func (*TrackedConnection) Close added in v1.0.63

func (c *TrackedConnection) Close() error

Close stops the tracked connection and removes it from its lifetime entry.

func (*TrackedConnection) Context added in v1.0.63

func (c *TrackedConnection) Context() context.Context

Context returns the connection lifetime context.

func (*TrackedConnection) Lifetime added in v1.0.63

Lifetime returns the lifetime currently associated with this connection.

Directories

Path Synopsis
pop

Jump to

Keyboard shortcuts

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