Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions jail.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"log/slog"
"os/exec"
"time"

"github.com/coder/jail/proxy"
)

type Commander interface {
Expand All @@ -17,15 +15,20 @@ type Commander interface {
Close() error
}

type ProxyServer interface {
Start(ctx context.Context) error
Stop() error
}

type Config struct {
Commander Commander
ProxyServer *proxy.ProxyServer
ProxyServer ProxyServer
Logger *slog.Logger
}

type Jail struct {
commandExecutor Commander
proxyServer *proxy.ProxyServer
proxyServer ProxyServer
logger *slog.Logger
cancel context.CancelFunc
ctx context.Context
Expand Down
Loading