Movatterモバイル変換


[0]ホーム

URL:


dashboard

package
v2.23.0Latest Latest
Warning

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

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

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcScreenshotadded inv2.3.0

func Screenshot(ctxcontext.Context, namestring) (string,error)

Types

typeActionadded inv2.2.1

type Action func(ctxcontext.Context)error

Action is just a function that does something.

typeConfig

type Config struct {// Interval is the minimum interval between fetches.Intervaltime.Duration `json:"interval"`// Jitter is the maximum interval between fetches.Jittertime.Duration `json:"jitter"`// Trace is whether to trace the requests.Tracebool `json:"trace"`// Logger is the logger to use.Loggerslog.Logger `json:"-"`// Headless controls headless mode for chromedp.Headlessbool `json:"headless"`// ActionFunc is a function that returns an action to run.ActionFunc func(ctxcontext.Context, logslog.Logger, randIntn func(int)int, deadlinetime.Time) (Label,Action,error) `json:"-"`// WaitLoaded is a function that waits for the page to be loaded.WaitLoaded func(ctxcontext.Context, deadlinetime.Time)error// Screenshot is a function that takes a screenshot.Screenshot func(ctxcontext.Context, filenamestring) (string,error)// RandIntn is a function that returns a random number between 0 and n-1.RandIntn func(int)int `json:"-"`// InitChromeDPCtx is a function that initializes ChromeDP into the given context.Context.InitChromeDPCtx func(ctxcontext.Context, logslog.Logger, u *url.URL, sessionTokenstring, headlessbool) (context.Context,context.CancelFunc,error) `json:"-"`}

func (Config)Validate

func (cConfig) Validate()error

typeLabeladded inv2.2.1

type Labelstring

Label identifies an action.

typeMetrics

type Metrics interface {ObserveDuration(actionstring, dtime.Duration)IncErrors(actionstring)}

typePromMetrics

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

func (*PromMetrics)IncErrors

func (p *PromMetrics) IncErrors(actionstring)

func (*PromMetrics)ObserveDuration

func (p *PromMetrics) ObserveDuration(actionstring, dtime.Duration)

typeRunner

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

funcNewRunner

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

func (*Runner)Cleanup

func (*Runner) Cleanup(_context.Context, _string, _io.Writer)error

func (*Runner)Run

func (r *Runner) Run(ctxcontext.Context, _string, _io.Writer)error

typeSelectoradded inv2.2.1

type Selectorstring

Selector locates an element on a page.

typeTargetadded inv2.2.1

type Target struct {// Label is a human-readable label for the target.LabelLabel// ClickOn is the selector that locates the element to be clicked.ClickOnSelector// WaitFor is a selector that is expected to appear after the target is clicked.WaitForSelector}

Target is a thing that can be clicked.

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