workspacetraffic
package v2.23.1
Go to latest Published: Jun 10, 2025 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:23 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
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}
typeConnMetrics¶
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
Click to show internal directories.
Click to hide internal directories.