forked from go-delve/delve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
39 lines (30 loc) · 1.19 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package service
import (
"net"
"github.com/go-delve/delve/service/debugger"
)
// Config provides the configuration to start a Debugger and expose it with a
// service.
//
// Only one of ProcessArgs or AttachPid should be specified. If ProcessArgs is
// provided, a new process will be launched. Otherwise, the debugger will try
// to attach to an existing process with AttachPid.
type Config struct {
// Debugger configuration object, used to configure the underlying
// debugger used by the server.
Debugger debugger.Config
// Listener is used to serve requests.
Listener net.Listener
// ProcessArgs are the arguments to launch a new process.
ProcessArgs []string
// AcceptMulti configures the server to accept multiple connection.
// Note that the server API is not reentrant and clients will have to coordinate.
AcceptMulti bool
// APIVersion selects which version of the API to serve (default: 1).
APIVersion int
// CheckLocalConnUser is true if the debugger should check that local
// connections come from the same user that started the headless server
CheckLocalConnUser bool
// DisconnectChan will be closed by the server when the client disconnects
DisconnectChan chan<- struct{}
}