config.go 1.0 KB
Newer Older
D
Derek Parker 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package service

import "net"

// 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 {
	// Listener is used to serve requests.
	Listener net.Listener
	// ProcessArgs are the arguments to launch a new process.
	ProcessArgs []string
E
Evgeny L 已提交
16 17 18 19
	// WorkingDir is working directory of the new process. This field is used
	// only when launching a new process.
	WorkingDir string

D
Derek Parker 已提交
20 21 22
	// AttachPid is the PID of an existing process to which the debugger should
	// attach.
	AttachPid int
A
aarzilli 已提交
23 24
	// AcceptMulti configures the server to accept multiple connection.
	// Note that the server API is not reentrant and clients will have to coordinate.
25
	AcceptMulti bool
A
aarzilli 已提交
26 27
	// APIVersion selects which version of the API to serve (default: 1).
	APIVersion int
28 29 30

	// CoreFile specifies the path to the core dump to open
	CoreFile string
D
Derek Parker 已提交
31
}