Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
/coder-xrayPublic archive

Commit50af8fb

Browse files
committed
random stuff
1 parent01c9b7f commit50af8fb

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

‎reporter/reporter.go‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ type K8sReporter struct {
3434
factory informers.SharedInformerFactory
3535
}
3636

37-
typeWorkspaceAgentstruct {
38-
Imagestring
39-
Tokenstring
40-
}
41-
4237
func (k*K8sReporter)Init(ctx context.Context)error {
4338
k.factory=informers.NewSharedInformerFactoryWithOptions(k.Client,0,informers.WithNamespace(k.Namespace),informers.WithTweakListOptions(func(lo*v1.ListOptions) {
4439
lo.FieldSelector=k.FieldSelector

‎root.go‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ func root() *cobra.Command {
4343
}
4444

4545
ifartifactoryURL=="" {
46-
returnxerrors.New("--coder-url is required")
46+
returnxerrors.New("--artifactory-url is required")
4747
}
4848

4949
_,err=url.Parse(artifactoryURL)
5050
iferr!=nil {
51-
returnfmt.Errorf("parsecoder URL: %w",err)
51+
returnfmt.Errorf("parseartifactory URL: %w",err)
5252
}
5353

5454
ifartifactoryUser=="" {
@@ -75,13 +75,13 @@ func root() *cobra.Command {
7575
}
7676

7777
coderClient:=reporter.NewClient(coderParsed,coderToken)
78-
78+
logger:=slog.Make(sloghuman.Sink(cmd.ErrOrStderr()))
7979
kr:= reporter.K8sReporter{
8080
Client:kclient,
8181
JFrogClient:jclient,
8282
CoderClient:coderClient,
8383
Namespace:namespace,
84-
Logger:slog.Make(sloghuman.Sink(cmd.ErrOrStderr())),
84+
Logger:logger,
8585
}
8686

8787
err=kr.Init(cmd.Context())
@@ -91,9 +91,11 @@ func root() *cobra.Command {
9191

9292
stopCh:=make(chanstruct{})
9393
deferclose(stopCh)
94-
gokr.Start(stopCh)
94+
kr.Start(stopCh)
9595
<-cmd.Context().Done()
9696

97+
logger.Info(cmd.Context(),"exiting")
98+
9799
returnnil
98100
},
99101
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp