Documentation
¶
Index ¶
- func WithClientIdentity(ctx context.Context, id string) context.Context
- type Config
- type Handler
- func (h *Handler) NodeActive() bool
- func (h *Handler) ObservedNamespaces() []string
- func (h *Handler) Register(mux *http.ServeMux)
- func (h *Handler) ReleaseHA(ctx context.Context)
- func (h *Handler) StopHA()
- func (h *Handler) SweepIdleMaintenance(ctx context.Context, opts core.IdleSweepOptions) error
- func (h *Handler) SweepTransactions(ctx context.Context, now time.Time) error
- type NamespaceTracker
- type ShutdownState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithClientIdentity ¶
WithClientIdentity returns a new context carrying the TLS client identity extracted during request handling. The expectation is that middleware sets this based on the verified certificate's subject/serial.
Types ¶
type Config ¶
type Config struct {
Store storage.Backend
Crypto *storage.Crypto
QueueService *queue.Service
SearchAdapter search.Adapter
NamespaceConfigs *namespaces.ConfigStore
DefaultNamespaceConfig namespaces.Config
IndexManager *indexer.Manager
Logger pslog.Logger
Clock clock.Clock
HAMode string
HALeaseTTL time.Duration
HASinglePresenceTTL time.Duration
DefaultNamespace string
JSONMaxBytes int64
AttachmentMaxBytes int64
CompactWriter func(io.Writer, io.Reader, int64) error
DefaultTTL time.Duration
MaxTTL time.Duration
AcquireBlock time.Duration
SpoolMemoryThreshold int64
TxnDecisionRetention time.Duration
TxnReplayInterval time.Duration
QueueDecisionCacheTTL time.Duration
QueueDecisionMaxApply int
QueueDecisionApplyTimeout time.Duration
StateCacheBytes int64
QueryDocPrefetch int
EnforceClientIdentity bool
MetaWarmupAttempts int
MetaWarmupInitialDelay time.Duration
MetaWarmupMaxDelay time.Duration
StateWarmupAttempts int
StateWarmupInitialDelay time.Duration
StateWarmupMaxDelay time.Duration
QueueMaxConsumers int
QueuePollInterval time.Duration
QueuePollJitter time.Duration
QueueResilientPollInterval time.Duration
QueueListPageSize int
LSFObserver *lsf.Observer
QRFController *qrf.Controller
ShutdownState func() ShutdownState
ActivityHook func()
NamespaceTracker *NamespaceTracker
DisableHTTPTracing bool
TCAuthEnabled bool
TCTrustPool *x509.CertPool
DefaultCAPool *x509.CertPool
TCAllowDefaultCA bool
TCLeader *tcleader.Manager
SelfEndpoint string
TCClusterIdentity string
TCJoinEndpoints []string
TCFanoutTimeout time.Duration
TCFanoutMaxAttempts int
TCFanoutBaseDelay time.Duration
TCFanoutMaxDelay time.Duration
TCFanoutMultiplier float64
TCFanoutGate txncoord.FanoutGate
TCFanoutTrustPEM [][]byte
TCLeaveFanout func(context.Context) error
TCClusterLeaveSelf func()
TCClusterJoinSelf func()
TCClientBundlePath string
TCServerBundle *tlsutil.Bundle
DisableMTLS bool
}
Config groups the dependencies required by Handler.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler wires HTTP endpoints to backend operations.
func (*Handler) NodeActive ¶ added in v0.3.0
NodeActive reports whether this server is currently active for failover mode.
func (*Handler) ObservedNamespaces ¶ added in v0.1.0
ObservedNamespaces returns the namespaces seen by this handler since startup.
func (*Handler) ReleaseHA ¶ added in v0.3.0
ReleaseHA releases the HA lease via the handler's core service.
func (*Handler) StopHA ¶ added in v0.3.0
func (h *Handler) StopHA()
StopHA stops the HA lease refresh loop for the handler's core service.
func (*Handler) SweepIdleMaintenance ¶ added in v0.2.0
SweepIdleMaintenance runs low-impact maintenance sweeping when the server is idle.
type NamespaceTracker ¶ added in v0.1.0
type NamespaceTracker struct {
// contains filtered or unexported fields
}
NamespaceTracker records namespaces observed by the handler/server so that background tasks (sweepers, diagnostics) can iterate all active namespaces.
func NewNamespaceTracker ¶ added in v0.1.0
func NewNamespaceTracker(defaultNamespace string) *NamespaceTracker
NewNamespaceTracker initializes a tracker seeded with the provided default namespace (if non-empty).
func (*NamespaceTracker) All ¶ added in v0.1.0
func (t *NamespaceTracker) All() []string
All returns a sorted slice of observed namespaces.
func (*NamespaceTracker) Observe ¶ added in v0.1.0
func (t *NamespaceTracker) Observe(namespace string)
Observe records namespace as active.