Movatterモバイル変換


[0]ホーム

URL:


agentapi

package
v2.24.2Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License:AGPL-3.0Imports:51Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcWatchWorkspaceAgentMetadataChannel

func WatchWorkspaceAgentMetadataChannel(iduuid.UUID)string

funcWithAPIVersionadded inv2.8.0

func WithAPIVersion(ctxcontext.Context, versionstring)context.Context

Types

typeAPI

API implements the DRPC agent API interface from agent/proto. This struct isinstantiated once per agent connection and kept alive for the duration of thesession.

funcNew

func New(optsOptions) *API

func (*API)Serve

func (a *API) Serve(ctxcontext.Context, lnet.Listener)error

func (*API)Server

func (a *API) Server(ctxcontext.Context) (*drpcserver.Server,error)

typeAnnouncementBannerAPIadded inv2.12.0

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

func (*AnnouncementBannerAPI)GetAnnouncementBannersadded inv2.12.0

func (*AnnouncementBannerAPI)GetServiceBannerdeprecatedadded inv2.12.0

Deprecated: GetServiceBanner has been deprecated in favor of GetAnnouncementBanners.

typeAuditAPIadded inv2.20.0

type AuditAPI struct {AgentFn  func(context.Context) (database.WorkspaceAgent,error)Auditor  *atomic.Pointer[audit.Auditor]Databasedatabase.StoreLogslog.Logger}

func (*AuditAPI)ReportConnectionadded inv2.20.0

typeLifecycleAPI

type LifecycleAPI struct {AgentFn                  func(context.Context) (database.WorkspaceAgent,error)WorkspaceIDuuid.UUIDDatabasedatabase.StoreLogslog.LoggerPublishWorkspaceUpdateFn func(context.Context, *database.WorkspaceAgent,wspubsub.WorkspaceEventKind)errorTimeNowFn func()time.Time// defaults to dbtime.Now()}

func (*LifecycleAPI)UpdateLifecycle

func (*LifecycleAPI)UpdateStartup

typeLogsAPI

type LogsAPI struct {AgentFn                           func(context.Context) (database.WorkspaceAgent,error)Databasedatabase.StoreLogslog.LoggerPublishWorkspaceUpdateFn          func(context.Context, *database.WorkspaceAgent,wspubsub.WorkspaceEventKind)errorPublishWorkspaceAgentLogsUpdateFn func(ctxcontext.Context, workspaceAgentIDuuid.UUID, msgagentsdk.LogsNotifyMessage)TimeNowFn func()time.Time// defaults to dbtime.Now()}

typeManifestAPI

type ManifestAPI struct {AccessURL                *url.URLAppHostnamestringExternalAuthConfigs      []*externalauth.ConfigDisableDirectConnectionsboolDerpForceWebSocketsboolWorkspaceIDuuid.UUIDAgentFn   func(context.Context) (database.WorkspaceAgent,error)Databasedatabase.StoreDerpMapFn func() *tailcfg.DERPMap}

typeMetadataAPI

type MetadataAPI struct {AgentFn  func(context.Context) (database.WorkspaceAgent,error)Databasedatabase.StorePubsubpubsub.PubsubLogslog.LoggerTimeNowFn func()time.Time// defaults to dbtime.Now()}

typeOptions

type Options struct {AgentIDuuid.UUIDOwnerIDuuid.UUIDWorkspaceIDuuid.UUIDOrganizationIDuuid.UUIDCtxcontext.ContextLogslog.LoggerClockquartz.ClockDatabasedatabase.StoreNotificationsEnqueuernotifications.EnqueuerPubsubpubsub.PubsubAuditor                           *atomic.Pointer[audit.Auditor]DerpMapFn                         func() *tailcfg.DERPMapTailnetCoordinator                *atomic.Pointer[tailnet.Coordinator]StatsReporter                     *workspacestats.ReporterAppearanceFetcher                 *atomic.Pointer[appearance.Fetcher]PublishWorkspaceUpdateFn          func(ctxcontext.Context, userIDuuid.UUID, eventwspubsub.WorkspaceEvent)PublishWorkspaceAgentLogsUpdateFn func(ctxcontext.Context, workspaceAgentIDuuid.UUID, msgagentsdk.LogsNotifyMessage)NetworkTelemetryHandler           func(batch []*tailnetproto.TelemetryEvent)AccessURL                 *url.URLAppHostnamestringAgentStatsRefreshIntervaltime.DurationDisableDirectConnectionsboolDerpForceWebSocketsboolDerpMapUpdateFrequencytime.DurationExternalAuthConfigs       []*externalauth.ConfigExperimentscodersdk.ExperimentsUpdateAgentMetricsFn func(ctxcontext.Context, labelsprometheusmetrics.AgentMetricLabels, metrics []*agentproto.Stats_Metric)}

typeResourcesMonitoringAPIadded inv2.20.0

type ResourcesMonitoringAPI struct {AgentIDuuid.UUIDWorkspaceIDuuid.UUIDLogslog.LoggerClockquartz.ClockDatabasedatabase.StoreNotificationsEnqueuernotifications.EnqueuerDebouncetime.DurationConfigresourcesmonitor.Config}

func (*ResourcesMonitoringAPI)PushResourcesMonitoringUsageadded inv2.20.0

typeScriptsAPIadded inv2.16.0

type ScriptsAPI struct {Databasedatabase.Store}

typeStatsAPI

type StatsAPI struct {AgentFn                   func(context.Context) (database.WorkspaceAgent,error)Databasedatabase.StoreLogslog.LoggerStatsReporter             *workspacestats.ReporterAgentStatsRefreshIntervaltime.DurationExperimentscodersdk.ExperimentsTimeNowFn func()time.Time// defaults to dbtime.Now()}

typeSubAgentAPIadded inv2.24.0

type SubAgentAPI struct {OwnerIDuuid.UUIDOrganizationIDuuid.UUIDAgentIDuuid.UUIDAgentFn        func(context.Context) (database.WorkspaceAgent,error)Logslog.LoggerClockquartz.ClockDatabasedatabase.Store}

func (*SubAgentAPI)CreateSubAgentadded inv2.24.0

func (*SubAgentAPI)DeleteSubAgentadded inv2.24.0

func (*SubAgentAPI)ListSubAgentsadded inv2.24.0

typeWorkspaceAgentMetadataChannelPayload

type WorkspaceAgentMetadataChannelPayload struct {CollectedAttime.Time `json:"collected_at"`Keys        []string  `json:"keys"`}

Source Files

View all Source files

Directories

PathSynopsis

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