proxy

package
v0.0.0-...-c20d9b3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtxKey

type CtxKey struct{}

type LLMProxy

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

func NewLLMProxy

func NewLLMProxy(
	logger *slog.Logger,
	cfg *config.Config,
	usecase domain.ProxyUsecase,
) *LLMProxy

func (*LLMProxy) Close

func (l *LLMProxy) Close() error

func (*LLMProxy) ServeHTTP

func (l *LLMProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ProxyCtx

type ProxyCtx struct {
	Path       string
	Model      *domain.Model
	Header     http.Header
	RespHeader http.Header
	ReqTee     *tee.ReqTee
	RequestID  string
	UserID     string
	Metadata   map[string]string
	// contains filtered or unexported fields
}

type Recorder

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

func NewRecorder

func NewRecorder(
	cfg *config.Config,
	ctx *ProxyCtx,
	src io.ReadCloser,
	logger *slog.Logger,
	usecase domain.ProxyUsecase,
) *Recorder

func (*Recorder) Close

func (r *Recorder) Close() error

Close implements io.ReadCloser.

func (*Recorder) Read

func (r *Recorder) Read(p []byte) (n int, err error)

Read implements io.ReadCloser.

type RespLog

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

func NewRespLog

func NewRespLog(ctx context.Context, logger *slog.Logger, src io.ReadCloser) *RespLog

func (*RespLog) Close

func (r *RespLog) Close() error

Close implements io.ReadCloser.

func (*RespLog) Read

func (r *RespLog) Read(p []byte) (n int, err error)

Read implements io.ReadCloser.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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