Movatterモバイル変換


[0]ホーム

URL:


agenttest

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:27Imported by:0

Details

Repository

github.com/coder/coder

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcNewadded inv2.2.0

func New(ttesting.TB, coderURL *url.URL, agentTokenstring, opts ...func(*agent.Options))agent.Agent

New starts a new agent for use in tests.The agent will use the provided coder URL and session token.The options passed to agent.New() can be modified by passing an optionalvariadic func(*agent.Options).Returns the agent. Closing the agent is handled by the test cleanup.It is the responsibility of the caller to call coderdtest.AwaitWorkspaceAgentsto ensure agent is connected.

Types

typeClient

type Client struct {LastWorkspaceAgent func()// contains filtered or unexported fields}

funcNewClient

func NewClient(ttesting.TB,loggerslog.Logger,agentIDuuid.UUID,manifestagentsdk.Manifest,statsChan chan *agentproto.Stats,coordinatortailnet.Coordinator,) *Client

func (*Client)Closeadded inv2.8.0

func (c *Client) Close()

func (*Client)ConnectRPC25added inv2.23.0

func (*Client)GetConnectionReportsadded inv2.21.0

func (c *Client) GetConnectionReports() []*agentproto.ReportConnectionRequest

func (*Client)GetLifecycleStates

func (c *Client) GetLifecycleStates() []codersdk.WorkspaceAgentLifecycle

func (*Client)GetMetadata

func (c *Client) GetMetadata() map[string]agentsdk.Metadata

func (*Client)GetStartup

func (c *Client) GetStartup() <-chan *agentproto.Startup

func (*Client)GetStartupLogs

func (c *Client) GetStartupLogs() []agentsdk.Log

func (*Client)PushDERPMapUpdate

func (c *Client) PushDERPMapUpdate(update *tailcfg.DERPMap)error

func (*Client)RewriteDERPMapadded inv2.8.0

func (*Client) RewriteDERPMap(*tailcfg.DERPMap)

func (*Client)SetAnnouncementBannersFuncadded inv2.12.0

func (c *Client) SetAnnouncementBannersFunc(f func() ([]codersdk.BannerConfig,error))

func (*Client)SetLogsChanneladded inv2.9.0

func (c *Client) SetLogsChannel(ch chan<- *agentproto.BatchCreateLogsRequest)

typeFakeAgentAPIadded inv2.8.0

type FakeAgentAPI struct {sync.Mutex// contains filtered or unexported fields}

funcNewFakeAgentAPIadded inv2.8.0

func NewFakeAgentAPI(ttesting.TB, loggerslog.Logger, manifest *agentproto.Manifest, statsCh chan *agentproto.Stats) *FakeAgentAPI

func (*FakeAgentAPI)AppHealthChadded inv2.9.0

func (f *FakeAgentAPI) AppHealthCh() <-chan *agentproto.BatchUpdateAppHealthRequest

func (*FakeAgentAPI)BatchCreateLogsadded inv2.8.0

func (*FakeAgentAPI)BatchUpdateAppHealthsadded inv2.8.0

func (*FakeAgentAPI)BatchUpdateMetadataadded inv2.8.0

func (*FakeAgentAPI)GetConnectionReportsadded inv2.21.0

func (f *FakeAgentAPI) GetConnectionReports() []*agentproto.ReportConnectionRequest

func (*FakeAgentAPI)GetLifecycleStatesadded inv2.9.0

func (f *FakeAgentAPI) GetLifecycleStates() []codersdk.WorkspaceAgentLifecycle

func (*FakeAgentAPI)GetManifestadded inv2.8.0

func (*FakeAgentAPI)GetMetadataadded inv2.9.0

func (f *FakeAgentAPI) GetMetadata() map[string]agentsdk.Metadata

func (*FakeAgentAPI)GetServiceBanneradded inv2.8.0

func (*FakeAgentAPI)GetTimingsadded inv2.16.0

func (f *FakeAgentAPI) GetTimings() []*agentproto.Timing

func (*FakeAgentAPI)ReportConnectionadded inv2.20.0

func (*FakeAgentAPI)SetAnnouncementBannersFuncadded inv2.12.0

func (f *FakeAgentAPI) SetAnnouncementBannersFunc(fn func() ([]codersdk.BannerConfig,error))

func (*FakeAgentAPI)SetLogsChanneladded inv2.9.0

func (f *FakeAgentAPI) SetLogsChannel(ch chan<- *agentproto.BatchCreateLogsRequest)

func (*FakeAgentAPI)UpdateLifecycleadded inv2.8.0

func (*FakeAgentAPI)UpdateStartupadded inv2.8.0

func (*FakeAgentAPI)UpdateStatsadded inv2.8.0

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