Example #1
0
func init() {
	server.Register("http", func(address string, r runner.Runner, auth ...string) (server.Server, error) {
		srv := NewServer(r)
		srv.Server.Addr = address
		if len(auth) >= 2 {
			srv.certFile = auth[0]
			srv.keyFile = auth[1]
		}
		return srv, nil
	})
}
Example #2
0
func init() {
	server.Register("test", func(_ string, _ runner.Runner, _ ...string) (server.Server, error) {
		return new(testServer), nil
	})
}