slots

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 7 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	SlotName string
	Index    int
	Manager  *session.Manager
	Healthy  func() bool

	// Reporter owns the member server's session gauge. Sessions the group
	// routes to this member increment this reporter so read-time daemon
	// derivation counts them.
	Reporter metrics.ServerMetricsReporter
}

type Multiplexer

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

func NewMultiplexer

func NewMultiplexer(groupName string, logger *slog.Logger, entries []Entry) *Multiplexer

func (*Multiplexer) AdmissionStatus

func (m *Multiplexer) AdmissionStatus() (atCapacity bool, current int, max int)

func (*Multiplexer) CloseAll

func (m *Multiplexer) CloseAll()

func (*Multiplexer) Rebind

func (m *Multiplexer) Rebind(oldKey, newKey string)

func (*Multiplexer) Release

func (m *Multiplexer) Release(upstreamSessionID string)

func (*Multiplexer) ReplaceEntries

func (m *Multiplexer) ReplaceEntries(entries []Entry)

func (*Multiplexer) ReportSpawnResult

func (m *Multiplexer) ReportSpawnResult(sessionKey string, err error)

func (*Multiplexer) ReporterFor added in v1.5.11

ReporterFor resolves the per-server metrics reporter owning the given member manager's sessions, so the proxy can feed group-created sessions into their existing owner.

func (*Multiplexer) SelectForNewSession

func (m *Multiplexer) SelectForNewSession(_ context.Context, upstreamSessionID string) (*session.Manager, error)

func (*Multiplexer) SetOnSessionRemoved

func (m *Multiplexer) SetOnSessionRemoved(fn func(sessionID string))

SetOnSessionRemoved stores the group proxy's removal observer and adds it to every current member manager. Member managers keep their own endpoint's callback: sessions created through either endpoint must reach their owning proxy's closeDownstream.

Jump to

Keyboard shortcuts

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