bridgelib

package
v1.5.0 Latest Latest
Warning

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachState

type AttachState struct {
	ClientID  string
	Replay    []OutputChunk
	Live      <-chan OutputChunk
	ReplayGap bool
}

type Bridge

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

func New

func New(cfg Config) (*Bridge, error)

func (*Bridge) AttachSession

func (b *Bridge) AttachSession(sessionID, clientID string, afterSeq uint64) (*bridge.AttachState, error)

func (*Bridge) AttachSessionObserver

func (b *Bridge) AttachSessionObserver(sessionID, clientID string, afterSeq uint64) (*bridge.AttachState, error)

func (*Bridge) Get

func (b *Bridge) Get(sessionID string) (*SessionInfo, error)

func (*Bridge) List

func (b *Bridge) List(projectID string) []SessionInfo

func (*Bridge) ResizeSession

func (b *Bridge) ResizeSession(sessionID, clientID string, cols, rows uint32) error

func (*Bridge) StartSession

func (b *Bridge) StartSession(ctx context.Context, projectID, sessionID, repoPath, providerID string, opts map[string]string) (*SessionInfo, error)

func (*Bridge) Stop

func (b *Bridge) Stop(sessionID string, force bool) error

func (*Bridge) WriteInput

func (b *Bridge) WriteInput(sessionID, clientID string, data []byte) (int, error)

type Config

type Config struct {
	Providers             []ProviderConfig
	AllowedPaths          []string
	MaxSessions           int
	MaxSessionsPerProject int
	IdleTimeout           time.Duration
	OutputBufferBytes     int
}

type OutputChunk

type OutputChunk = bridge.OutputChunk

type ProviderConfig

type ProviderConfig struct {
	ID             string
	Binary         string
	Args           []string
	StartupTimeout time.Duration
	StopGrace      time.Duration
	PromptPattern  string
	RequiredEnv    []string
}

type SessionInfo

type SessionInfo = bridge.SessionInfo

Jump to

Keyboard shortcuts

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