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 e0737af commit e4f5438Copy full SHA for e4f5438
pkg/agent/agent.go
@@ -392,13 +392,18 @@ func (a *Agent) Close() error {
392
return (*l).Close()
393
}
394
395
+const (
396
+ ConnectionV1 = 1
397
+ ConnectionV2 = 2
398
+)
399
+
400
func (a *Agent) Listen(ctx context.Context) error {
401
a.mode.Serve(a)
402
403
switch a.config.ConnectionVersion {
- case 1:
404
+ case ConnectionV1:
405
return a.listenV1(ctx)
- case 2:
406
+ case ConnectionV2:
407
return a.listenV2(ctx)
408
default:
409
return fmt.Errorf("unsupported connection version: %d", a.config.ConnectionVersion)
0 commit comments