We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58b86c5 commit 7fe020eCopy full SHA for 7fe020e
agent/agent.go
@@ -377,13 +377,18 @@ func (a *Agent) Close() error {
377
return (*l).Close()
378
}
379
380
+const (
381
+ ConnectionV1 = 1
382
+ ConnectionV2 = 2
383
+)
384
+
385
func (a *Agent) Listen(ctx context.Context) error {
386
a.mode.Serve(a)
387
388
switch a.config.ConnectionVersion {
- case 1:
389
+ case ConnectionV1:
390
return a.listenV1(ctx)
- case 2:
391
+ case ConnectionV2:
392
return a.listenV2(ctx)
393
default:
394
return fmt.Errorf("unsupported connection version: %d", a.config.ConnectionVersion)
0 commit comments