server

package
v0.2.26 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package server provides the SSH server using Wish.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvValue

func GetEnvValue(environ []string, key string) string

GetEnvValue extracts a value from an environment variable list (key=value format).

Types

type Config

type Config struct {
	Addr        string // e.g. ":2222"
	HostKeyPath string // e.g. ".ssh/task_ed25519"
	DB          *db.DB
	Executor    *executor.Executor
}

Config holds server configuration.

type Server

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

Server is the SSH server.

func New

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

New creates a new SSH server.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the server.

func (*Server) Start

func (s *Server) Start() error

Start starts the SSH server.

Jump to

Keyboard shortcuts

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