Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunBackend ¶
func RunBackend(ctx context.Context, config RunnerConfig) error
RunBackend runs a backend process with common error handling and logging. It handles: - Socket cleanup - Argument sanitization for logging - Process lifecycle management - Error channel handling - Context cancellation
Types ¶
type Logger ¶
type Logger interface {
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
Warnln(args ...interface{})
}
Logger interface for backend logging
type RunnerConfig ¶
type RunnerConfig struct {
// BackendName is the display name of the backend (e.g., "llama.cpp", "vLLM")
BackendName string
// Socket is the unix socket path
Socket string
// BinaryPath is the path to the backend binary
BinaryPath string
// SandboxPath is the sandbox directory path
SandboxPath string
// SandboxConfig is the sandbox configuration string
SandboxConfig string
// Args are the command line arguments
Args []string
// Logger provides logging functionality
Logger Logger
// ServerLogWriter provides a writer for server logs
ServerLogWriter io.WriteCloser
}
RunnerConfig holds configuration for a backend runner
Click to show internal directories.
Click to hide internal directories.