2015-06-21 03:47:44 +00:00
|
|
|
package service
|
|
|
|
|
2020-04-13 18:07:15 +00:00
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
|
|
|
|
"github.com/go-delve/delve/service/debugger"
|
|
|
|
)
|
2015-06-21 03:47:44 +00:00
|
|
|
|
|
|
|
// 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 {
|
2020-04-13 18:07:15 +00:00
|
|
|
// Debugger configuration object, used to configure the underlying
|
|
|
|
// debugger used by the server.
|
|
|
|
Debugger debugger.Config
|
|
|
|
|
2015-06-21 03:47:44 +00:00
|
|
|
// Listener is used to serve requests.
|
|
|
|
Listener net.Listener
|
2020-04-13 18:07:15 +00:00
|
|
|
|
2015-06-21 03:47:44 +00:00
|
|
|
// ProcessArgs are the arguments to launch a new process.
|
|
|
|
ProcessArgs []string
|
2016-11-01 19:58:43 +00:00
|
|
|
|
2016-06-19 06:43:29 +00:00
|
|
|
// AcceptMulti configures the server to accept multiple connection.
|
|
|
|
// Note that the server API is not reentrant and clients will have to coordinate.
|
2016-02-01 10:05:26 +00:00
|
|
|
AcceptMulti bool
|
2020-04-13 18:07:15 +00:00
|
|
|
|
2016-06-19 06:43:29 +00:00
|
|
|
// APIVersion selects which version of the API to serve (default: 1).
|
|
|
|
APIVersion int
|
2017-04-03 09:17:54 +00:00
|
|
|
|
2020-02-11 17:06:29 +00:00
|
|
|
// CheckLocalConnUser is true if the debugger should check that local
|
|
|
|
// connections come from the same user that started the headless server
|
|
|
|
CheckLocalConnUser bool
|
|
|
|
|
2017-06-26 18:45:13 +00:00
|
|
|
// DisconnectChan will be closed by the server when the client disconnects
|
|
|
|
DisconnectChan chan<- struct{}
|
2015-06-21 03:47:44 +00:00
|
|
|
}
|