backends

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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