Example #1
0
func main() {
	flag.Parse()

	cfg := healthcheck.DefaultServerConfig()

	cfg.BatchSize = *batchSize
	cfg.ChannelSize = *channelSize
	cfg.EngineSocket = *engineSocket
	cfg.MaxFailures = *maxFailures
	cfg.RetryDelay = *retryDelay

	hc := healthcheck.NewServer(&cfg)
	server.ShutdownHandler(hc)
	hc.Run()
}
Example #2
0
// The seesaw_healthcheck binary implements the Seesaw Healthcheck component
// and is responsible for managing the configuration, scheduling and invocation
// of healthchecks against services and backends.
package main

import (
	"flag"

	"github.com/google/seesaw/common/server"
	"github.com/google/seesaw/healthcheck"
)

var (
	batchDelay = flag.Duration("batch_delay",
		healthcheck.DefaultServerConfig().BatchDelay,
		"The maximum time to wait for batch to fill before sending the batch to the engine")

	batchSize = flag.Int("batch_size",
		healthcheck.DefaultServerConfig().BatchSize,
		"The maximum number of notifications to include in a single RPC call to the engine")

	channelSize = flag.Int("channel_size",
		healthcheck.DefaultServerConfig().ChannelSize,
		"The size of the notification channel")

	engineSocket = flag.String("engine",
		healthcheck.DefaultServerConfig().EngineSocket,
		"Seesaw Engine Socket")

	maxFailures = flag.Int("max_failures",