Movatterモバイル変換


[0]ホーム

URL:


workspacetraffic

package
v2.23.1Latest Latest
Warning

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

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

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAppConfigadded inv2.7.0

type AppConfig struct {Namestring `json:"name"`URLstring `json:"url"`}

typeConfig

type Config struct {// AgentID is the workspace agent ID to which to connect.AgentIDuuid.UUID `json:"agent_id"`// BytesPerTick is the number of bytes to send to the agent per tick.BytesPerTickint64 `json:"bytes_per_tick"`// Duration is the total duration for which to send traffic to the agent.Durationtime.Duration `json:"duration"`// TickInterval specifies the interval between ticks (that is, attempts to// send data to workspace agents).TickIntervaltime.Duration `json:"tick_interval"`ReadMetricsConnMetrics `json:"-"`WriteMetricsConnMetrics `json:"-"`SSHbool `json:"ssh"`// Echo controls whether the agent should echo the data it receives.// If false, the agent will discard the data. Note that setting this// to true will double the amount of data read from the agent for// PTYs (e.g. reconnecting pty or SSH connections that request PTY).Echobool `json:"echo"`AppAppConfig `json:"app"`WebClient *codersdk.Client}

func (Config)Validate

func (cConfig) Validate()error

typeConnMetrics

type ConnMetrics interface {AddError(float64)ObserveLatency(float64)AddTotal(float64)}

typeMetrics

type Metrics struct {BytesReadTotalprometheus.CounterVecBytesWrittenTotalprometheus.CounterVecReadErrorsTotalprometheus.CounterVecWriteErrorsTotalprometheus.CounterVecReadLatencySecondsprometheus.HistogramVecWriteLatencySecondsprometheus.HistogramVecLabelNames          []string}

funcNewMetrics

func NewMetrics(regprometheus.Registerer, labelNames ...string) *Metrics

func (*Metrics)ReadMetrics

func (m *Metrics) ReadMetrics(lvs ...string)ConnMetrics

func (*Metrics)WriteMetrics

func (m *Metrics) WriteMetrics(lvs ...string)ConnMetrics

typeRunner

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

funcNewRunner

func NewRunner(client *codersdk.Client, cfgConfig) *Runner

func NewRunner(client *codersdk.Client, cfg Config, metrics *Metrics) *Runner {

func (*Runner)Cleanup

Cleanup does nothing, successfully.

func (*Runner)Run

func (r *Runner) Run(ctxcontext.Context, _string, logsio.Writer) (errerror)

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