server

package
v0.0.23 Latest Latest
Warning

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

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

Documentation

Overview

Package server exposes a shared JSON-RPC server mode for gbash runtimes.

The package is intentionally small and host-oriented. It lets embedders and shipped CLIs serve persistent gbash sessions over JSON-RPC endpoints without committing to a public client SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServeUnix

func ListenAndServeUnix(ctx context.Context, socketPath string, cfg Config) error

ListenAndServeUnix serves the gbash JSON-RPC protocol on a Unix domain socket.

func Serve

func Serve(ctx context.Context, ln net.Listener, cfg Config) error

Serve serves the gbash JSON-RPC protocol on an existing listener.

Types

type Config

type Config struct {
	Runtime    *gbash.Runtime
	Name       string
	Version    string
	SessionTTL time.Duration
}

Config configures the shared gbash server mode.

Jump to

Keyboard shortcuts

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