Documentation ¶
Overview ¶
Package servers provides an interface to initialize cloudprober servers using servers config.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StatusTmpl = template.Must(template.New("statusTmpl").Parse(`
<table class="status-list">
<tr>
<th>Type</th>
<th>Conf</th>
</tr>
{{ range . }}
<tr>
<td>{{.Type}}</td>
<td>
{{if .Conf}}
<pre>{{.Conf}}</pre>
{{else}}
default
{{end}}
</td>
</tr>
{{ end }}
</table>
`))
StatusTmpl variable stores the HTML template suitable to generate the servers' status for cloudprober's /status page. It expects an array of ServerInfo objects as input.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server interface {
Start(ctx context.Context, dataChan chan<- *metrics.EventMetrics) error
}
Server interface has only one method: Start.
type ServerInfo ¶
ServerInfo encapsulates a Server and related info.
Directories ¶
Path | Synopsis |
---|---|
Package grpc provides a simple gRPC server that acts as a probe target.
|
Package grpc provides a simple gRPC server that acts as a probe target. |
Package http implements an HTTP server that simply returns 'ok' for any URL and sends stats on a string channel.
|
Package http implements an HTTP server that simply returns 'ok' for any URL and sends stats on a string channel. |
Package udp implements a UDP server.
|
Package udp implements a UDP server. |
cmd
This binary implements a stand-alone UDP server using the cloudprober/servers/udp/udp package.
|
This binary implements a stand-alone UDP server using the cloudprober/servers/udp/udp package. |
Click to show internal directories.
Click to hide internal directories.