attemptproxy

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrContextBuildRejected = errors.New("attempt proxy context rejected")

Functions

func BoundChannelErrorCode

func BoundChannelErrorCode(err error) string

func IngressMiddleware

func IngressMiddleware(cfg IngressConfig) gin.HandlerFunc

Types

type BoundChannelError

type BoundChannelError struct {
	Code string
}

func (*BoundChannelError) Error

func (e *BoundChannelError) Error() string

type BoundChannelFinder

type BoundChannelFinder interface {
	Find(BoundChannelInput) (state.Attempt, error)
}

func NewBoundChannelFinder

func NewBoundChannelFinder(cache app.AgentCache) BoundChannelFinder

type BoundChannelInput

type BoundChannelInput struct {
	User            *app.UserInfo
	Attempt         attemptwire.BoundAttempt
	InboundProtocol codec.Protocol
}

type ContextBuilder

type ContextBuilder interface {
	Build(*gin.Context, attemptwire.AttemptProxyMeta) (*state.RelayContext, func(), error)
}

func NewContextBuilder

func NewContextBuilder(agent app.AgentApplication) ContextBuilder

type Handler

type Handler struct {
	Contexts  ContextBuilder
	Channels  BoundChannelFinder
	Provider  attemptexec.ProviderAttemptExecutor
	Responses *ResponseExecutor
}

func NewHandler

func NewHandler(
	contexts ContextBuilder,
	channels BoundChannelFinder,
	provider attemptexec.ProviderAttemptExecutor,
	responses *ResponseExecutor,
) *Handler

func (*Handler) Serve

func (h *Handler) Serve(c *gin.Context)

type IngressConfig

type IngressConfig struct {
	FindAgentByID    func(string) *models.Agent
	LoadAuthSnapshot func() agentproxy.ForwardAuthSnapshot
}

type ResponseExecutor

type ResponseExecutor struct{}

func NewResponseExecutor

func NewResponseExecutor() *ResponseExecutor

func (*ResponseExecutor) Execute

func (e *ResponseExecutor) Execute(
	rctx *state.RelayContext,
	attempt state.Attempt,
	provider attemptexec.ProviderAttemptExecutor,
)

Jump to

Keyboard shortcuts

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