Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreSigpipe ¶
func IgnoreSigpipe()
IgnoreSigpipe consumes (and ignores) SIGPIPE signals. As of Go 1.6, these are generated only for stdout and stderr.
This is useful where a reflowlet's standard output is closed while running, as can happen when journald restarts on systemd managed systems.
See the following for more information:
https://bugzilla.redhat.com/show_bug.cgi?id=1300076
Types ¶
type Server ¶
type Server struct { // Config is the server's config. Config infra.Config // Addr is the address on which to listen. Addr string // Prefix is the prefix used for directory lookup; permits reflowlet // to run inside of Docker. Prefix string // Insecure listens on HTTP, not HTTPS. Insecure bool // Dir is the runtime data directory. Dir string // EC2Cluster tells whether this reflowlet is part of an EC2cluster. // When true, the reflowlet shuts down if it is idle after 10 minutes. EC2Cluster bool // HTTPDebug determines whether HTTP debug logging is turned on. HTTPDebug bool // NodeExporterMetricsPort determines whether to run a prometheus node_exporter daemon // on each Reflowlet. Setting a value runs the node_exporter daemon and configures it to // output prometheus metrics on the given port. Passing a non-zero value also adds an // additional route to the general Reflowlet server, such that metrics are made available // via proxy over the existing HTTPS connection and the following Reflow command: // $ reflow http https://${EC2_INST_PUBLIC_DNS}:9000/v1/node/metrics // If the user wishes to use other scrapers to fetch metrics from the Reflowlet over HTTP, // they may additionally choose to expose the port via the AWS settings for their Reflow // cluster. NodeExporterMetricsPort int // MetricsPort is the port where (if set to non-zero) prometheus metrics are being served. // If set to a non-zero value, an additional handler is always enabled (in the reflowlet server) such that, // metrics are available via proxy from the client side, accessible via the following Reflow command: // $ reflow http https://${EC2_INST_PUBLIC_DNS}:9000/v1/metrics MetricsPort int // contains filtered or unexported fields }
A Server is a reflow server, exposing a local pool over an HTTP server.
func (*Server) AddFlags ¶
AddFlags adds flags configuring various Reflowlet parameters to the provided FlagSet.
func (*Server) ListenAndServe ¶
ListenAndServe serves the Reflowlet server on the configured address.
Click to show internal directories.
Click to hide internal directories.