proxy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScriptWithGithub = "agentapi_with_github.sh"
	ScriptDefault    = "agentapi_default.sh"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentSession

type AgentSession struct {
	ID          string
	Port        int
	Process     *exec.Cmd
	Cancel      context.CancelFunc
	StartedAt   time.Time
	UserID      string
	Status      string
	Environment map[string]string
}

AgentSession represents a running agentapi server instance

type Proxy

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

Proxy represents the HTTP proxy server

func NewProxy

func NewProxy(cfg *config.Config, verbose bool) *Proxy

NewProxy creates a new proxy instance

func (*Proxy) GetEcho

func (p *Proxy) GetEcho() *echo.Echo

GetEcho returns the Echo instance for external access

func (*Proxy) Shutdown

func (p *Proxy) Shutdown(timeout time.Duration) error

Shutdown gracefully stops all running sessions and waits for them to terminate

type StartRequest

type StartRequest struct {
	UserID      string            `json:"user_id,omitempty"`
	Environment map[string]string `json:"environment,omitempty"`
}

StartRequest represents the request body for starting a new agentapi server

Jump to

Keyboard shortcuts

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