Documentation
¶
Index ¶
- Variables
- type FingerprintRegistry
- func (r *FingerprintRegistry) Accept(ctx context.Context, conn net.Conn, lifetime cluster.ConnectionLifetime) (*TrackedConnection, error)
- func (r *FingerprintRegistry) Fence(ctx context.Context, lifetime cluster.ConnectionLifetime, revision int64) error
- func (r *FingerprintRegistry) FenceAndAcknowledge(ctx context.Context, lifetime cluster.ConnectionLifetime, revision int64, ...) error
- func (r *FingerprintRegistry) LatestFenceRevision(lifetime cluster.ConnectionLifetime) int64
- type Server
- func (s *Server) ApplyInFlightConfig(cfg config.CredentialInFlightConfig) error
- func (s *Server) FenceFingerprint(ctx context.Context, lifetime cluster.ConnectionLifetime, revision int64, ...) error
- func (s *Server) HandleConn(ctx context.Context, conn net.Conn)
- func (s *Server) SetClusterHandler(handler clusterHandler)
- func (s *Server) SetConcurrencyReleaseStore(store dispatch.ConcurrencyReleaseStore)
- func (s *Server) SetInFlightSnapshotStore(store dispatch.InFlightSnapshotStore)
- type TrackedConnection
- func (c *TrackedConnection) AttachSubscriptionLifetime(lifetime cluster.ConnectionLifetime) error
- func (c *TrackedConnection) BeginHandler() (func(), error)
- func (c *TrackedConnection) Close() error
- func (c *TrackedConnection) Context() context.Context
- func (c *TrackedConnection) Lifetime() cluster.ConnectionLifetime
Constants ¶
This section is empty.
Variables ¶
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
func (r *FingerprintRegistry) Accept(ctx context.Context, conn net.Conn, lifetime cluster.ConnectionLifetime) (*TrackedConnection, error)
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 (*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 ¶
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
func (c *TrackedConnection) Lifetime() cluster.ConnectionLifetime
Lifetime returns the lifetime currently associated with this connection.