Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

wsconncache

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:13Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Overview

Package wsconncache caches workspace agent connections by UUID.Deprecated: Use ServerTailnet instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAgentProvideradded inv0.26.2

type AgentProvider struct {Cache *Cache}

func (*AgentProvider)AgentConnadded inv0.26.2

func (a *AgentProvider) AgentConn(_context.Context, agentIDuuid.UUID) (*codersdk.WorkspaceAgentConn, func(),error)

func (*AgentProvider)Closeadded inv0.26.2

func (a *AgentProvider) Close()error

func (*AgentProvider)ReverseProxyadded inv0.26.2

func (a *AgentProvider) ReverseProxy(targetURL *url.URL, dashboardURL *url.URL, agentIDuuid.UUID) (*httputil.ReverseProxy, func(),error)

typeCache

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

funcNewdeprecated

func New(dialerDialer, inactiveTimeouttime.Duration) *Cache

New creates a new workspace connection cache that closes connections afterthe inactive timeout provided.

Agent connections are cached due to Wireguard negotiation taking a fewhundred milliseconds, depending on latency.

Deprecated: Use coderd.NewServerTailnet instead. wsconncache is being phasedout because it creates a unique Tailnet for each agent.See:https://github.com/coder/coder/issues/8218

func (*Cache)Acquire

func (c *Cache) Acquire(iduuid.UUID) (*Conn, func(),error)

Acquire gets or establishes a connection with the dialer using the ID provided.If a connection is in-progress, that connection or error will be returned.

The returned function is used to release a lock on the connection. Once zerolocks exist on a connection, the inactive timeout will begin to tick down.After the time expires, the connection will be cleared from the cache.

func (*Cache)Close

func (c *Cache) Close()error

typeConn

type Conn struct {*codersdk.WorkspaceAgentConn// contains filtered or unexported fields}

Conn wraps an agent connection with a reusable HTTP transport.

func (*Conn)Closeadded inv0.16.0

func (c *Conn) Close()error

Close ends the HTTP transport if exists, and closes the agent.

func (*Conn)HTTPTransport

func (c *Conn) HTTPTransport() *http.Transport

typeDialer

type Dialer func(iduuid.UUID) (*codersdk.WorkspaceAgentConn,error)

Dialer creates a new agent connection by ID.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp