Documentation ¶
Overview ¶
Package app handles service lifecycle management, and other functionality necessary for the daemon-style server applications in this project.
Index ¶
- func RunUntilInterrupt(run func(ctx context.Context) error) (status int)
- func ServeGRPC(ctx context.Context, server *grpc.Server, listen string, timeout time.Duration, ...) error
- func ServeHTTPS(ctx context.Context, server *http.Server, timeout time.Duration, ...) error
- type Controller
- type Deferred
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunUntilInterrupt ¶
RunUntilInterrupt will run the function with a context which is cancelled when the process receives a SIGINT. If the function returns an error, it is printed to os.Stderr and the process will exit with a nonzero status code. There is special handling for errors from the multierr package; each error will be printed on its own line.
Types ¶
type Controller ¶
type Controller struct { SystemConfig sysconf.Config ControllerConfig appconf.Config Enrollment *enrollment.Server // services for drivers/automations Logger *zap.Logger Node *node.Node Tasks *task.Group Database *bolthold.Store TokenValidators *token.ValidatorSet GRPCCerts *pki.SourceSet Mux *http.ServeMux GRPC *grpc.Server HTTP *http.Server PrivateKey pki.PrivateKey ClientTLSConfig *tls.Config ManagerConn node.Remote // contains filtered or unexported fields }
func (*Controller) Defer ¶
func (c *Controller) Defer(d Deferred)
Defer indicates that the given Deferred should be executed when the Controllers Run method returns.
type VersionInfo ¶
var Version VersionInfo
func (VersionInfo) ServeHTTP ¶
func (v VersionInfo) ServeHTTP(w http.ResponseWriter, request *http.Request)
Directories ¶
Path | Synopsis |
---|---|
Package appconf provides runtime configuration.
|
Package appconf provides runtime configuration. |
Package files provides file utilities.
|
Package files provides file utilities. |
Package http provides http-specific configuration types and functionality.
|
Package http provides http-specific configuration types and functionality. |
Package sysconf provides system level configuration.
|
Package sysconf provides system level configuration. |
Click to show internal directories.
Click to hide internal directories.