sessionpicker

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package sessionpicker implements generation-fenced session selection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model is a value-updated one-active-session selector.

func New

func New(identity types.IdentityScope, current string) Model

New constructs a picker for one tenant/user authority.

func (Model) Apply

func (m Model) Apply(request Request, response types.SessionsListResponse) Model

Apply ignores stale or cross-scope responses and merges the current row deterministically.

func (Model) IsCurrent

func (m Model) IsCurrent(request Request) bool

IsCurrent reports whether an async response may update both picker data and dialog state.

func (Model) Rows

func (m Model) Rows() []types.SessionRow

Rows returns isolated visible session metadata.

func (Model) Search

func (m Model) Search(query string) (Model, Request)

Search begins a fenced request.

func (Model) Select

func (m Model) Select(session string) (types.IdentityScope, bool)

Select returns a complete target triple without mutating active state.

func (Model) SetCurrent

func (m Model) SetCurrent(session string) Model

SetCurrent is called only after stream drain, target auth, hydrate, and attach complete.

type Request

type Request struct {
	Generation uint64
	Identity   types.IdentityScope
	Query      string
	Cursor     string
}

Request identifies one async picker query. Results apply only to the exact generation and scope.

Jump to

Keyboard shortcuts

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