This commit is contained in:
Mitchell Hashimoto 2018-04-25 14:21:03 -07:00
parent 02ab461dae
commit c47ad68f25
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
3 changed files with 37 additions and 0 deletions

24
agent/proxy/daemon.go Normal file
View File

@ -0,0 +1,24 @@
package proxy
import (
"os/exec"
)
// Daemon is a long-running proxy process. It is expected to keep running
// and to use blocking queries to detect changes in configuration, certs,
// and more.
//
// Consul will ensure that if the daemon crashes, that it is restarted.
type Daemon struct {
// Command is the command to execute to start this daemon. This must
// be a Cmd that isn't yet started.
Command *exec.Cmd
// ProxyToken is the special local-only ACL token that allows a proxy
// to communicate to the Connect-specific endpoints.
ProxyToken string
}
// Start starts the daemon and keeps it running.
func (p *Daemon) Start() error {
}

1
agent/proxy/manager.go Normal file
View File

@ -0,0 +1 @@
package proxy

12
agent/proxy/proxy.go Normal file
View File

@ -0,0 +1,12 @@
// Package proxy contains logic for agent interaction with proxies,
// primarily "managed" proxies. Managed proxies are proxy processes for
// Connect-compatible endpoints that Consul owns and controls the lifecycle
// for.
//
// This package does not contain the built-in proxy for Connect. The source
// for that is available in the "connect/proxy" package.
package proxy
// EnvProxyToken is the name of the environment variable that is passed
// to managed proxies containing the proxy token.
const EnvProxyToken = "CONNECT_PROXY_TOKEN"