server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = 1

Variables

This section is empty.

Functions

func GetSocketPath

func GetSocketPath() string

func NewHumaConfig

func NewHumaConfig(title, version string) huma.Config

Types

type HTTPServer

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

func NewHTTP

func NewHTTP(addr string, indexer api.IndexerInterface, watcher api.WatcherInterface) *HTTPServer

func (*HTTPServer) Shutdown

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

func (*HTTPServer) Start

func (s *HTTPServer) Start() error

type IndexerInterface

type IndexerInterface interface {
	Search(query string, limit int) (*bleve.SearchResult, error)
	SearchWithOptions(opts *indexer.SearchOptions) (*bleve.SearchResult, error)
	SearchAll(opts *indexer.SearchOptions) (*indexer.SearchResult, error)
	ReindexAll() error
	SyncIncremental() error
	Stats() *config.IndexStats
	ListFiles(prefix string, limit int) ([]indexer.FileEntry, int, error)
}

type Router

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

func NewRouter

func NewRouter(indexer IndexerInterface, watcher WatcherInterface) *Router

func (*Router) RouteRequest

func (r *Router) RouteRequest(conn net.Conn, req models.Request)

type ServerInfo

type ServerInfo struct {
	APIVersion int `json:"apiVersion"`
}

type UnixServer

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

func NewUnix

func NewUnix(router *Router) *UnixServer

func (*UnixServer) Close

func (s *UnixServer) Close() error

func (*UnixServer) Start

func (s *UnixServer) Start() error

type WatcherInterface

type WatcherInterface interface {
	Start() error
	Stop() error
	IsRunning() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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