livesession

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: GPL-3.0 Imports: 5 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

Overview

Package livesession owns the shared lifecycle of plugin foreground sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host interface {
	PublishObservation(context.Context, protocol.Observation) error
	CompleteSession(context.Context, protocol.CompleteSessionRequest) error
}

type Session

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

func New

func New(host Host, instance protocol.InstanceRef, channel, key string, validFor time.Duration, now func() time.Time) *Session

func (*Session) Finish

func (s *Session) Finish(ctx context.Context, token string, notify bool, reason string) error

func (*Session) PublishTransient

func (s *Session) PublishTransient(ctx context.Context, scene protocol.Scene, reason string) error

func (*Session) SetCurrent

func (s *Session) SetCurrent(ctx context.Context, scene protocol.Scene, reason string, observedAt time.Time) error

func (*Session) Start

func (s *Session) Start(ctx context.Context, token string, fallback protocol.Scene, reason string) error

Jump to

Keyboard shortcuts

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