Documentation
¶
Index ¶
- func GenerateHostKeys(dir string, options KeygenOptions) ([]string, error)
- type GameConfig
- type KeygenOptions
- type Launcher
- func (l *Launcher) Address() string
- func (l *Launcher) Games() map[string]GameConfig
- func (l *Launcher) LaunchGameWithPTY(gameID string, session ssh.Session, ptyReq ssh.Pty, winCh <-chan ssh.Window) error
- func (l *Launcher) Serve() error
- func (l *Launcher) ServeWithListener(listener net.Listener) error
- func (l *Launcher) Server() *gssh.Server
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateHostKeys ¶
func GenerateHostKeys(dir string, options KeygenOptions) ([]string, error)
GenerateHostKeys generates SSH Ed25519 host keys and writes them to the specified directory Returns the paths to the generated key files
Types ¶
type GameConfig ¶
GameConfig represents a single game configuration
type KeygenOptions ¶
type KeygenOptions struct {
// OverwriteExisting determines whether to overwrite existing key files
OverwriteExisting bool
}
KeygenOptions configures key generation behavior
func DefaultKeygenOptions ¶
func DefaultKeygenOptions() KeygenOptions
DefaultKeygenOptions returns the default options for key generation
type Launcher ¶
type Launcher struct {
// contains filtered or unexported fields
}
Launcher is the main game launcher service
func NewLauncher ¶
NewLauncher creates a new launcher instance from configuration
func NewLauncherWithListener ¶
NewLauncherWithListener creates a launcher with a custom listener This is a convenience constructor for the common use case
func (*Launcher) Address ¶
Address returns the server listening address Returns empty string if using custom listener
func (*Launcher) Games ¶
func (l *Launcher) Games() map[string]GameConfig
Games returns a copy of the games configuration
func (*Launcher) LaunchGameWithPTY ¶
func (l *Launcher) LaunchGameWithPTY(gameID string, session ssh.Session, ptyReq ssh.Pty, winCh <-chan ssh.Window) error
LaunchGameWithPTY launches a game with proper PTY handling
func (*Launcher) ServeWithListener ¶
ServeWithListener starts the SSH server with a provided listener This allows runtime listener injection
type Option ¶
Option is a functional option for configuring the Launcher
func WithConfig ¶
WithConfig allows passing a pre-configured viper instance
func WithListener ¶
WithListener sets a custom net.Listener for the SSH server