Ejemplo n.º 1
0
// NewServer returns a new instance of Server.
func NewServer(c *run.Config) *Server {
	srv, _ := run.NewServer(c, "testServer")
	s := Server{
		Server: srv,
		Config: c,
	}
	configureLogging(&s)
	return &s
}
Ejemplo n.º 2
0
// NewServer returns a new instance of Server.
func NewServer(c *run.Config) *Server {
	srv, _ := run.NewServer(c, "testServer")
	s := Server{
		Server: srv,
		Config: c,
	}
	s.TSDBStore.EngineOptions.Config = c.Data
	configureLogging(&s)
	return &s
}
Ejemplo n.º 3
0
// OpenServerWithVersion opens a test server with a specific version.
func OpenServerWithVersion(c *run.Config, version string) *Server {
	srv, _ := run.NewServer(c, version)
	s := Server{
		Server: srv,
		Config: c,
	}
	configureLogging(&s)
	if err := s.Open(); err != nil {
		panic(err.Error())
	}

	return &s
}
Ejemplo n.º 4
0
// NewServer returns a new instance of Server.
func NewServer(c *run.Config) *Server {
	buildInfo := &run.BuildInfo{
		Version: "testServer",
		Commit:  "testCommit",
		Branch:  "testBranch",
	}
	srv, _ := run.NewServer(c, buildInfo)
	s := Server{
		Server: srv,
		Config: c,
	}
	return &s
}
Ejemplo n.º 5
0
// NewServer returns a new instance of Server.
func NewServer(c *run.Config) *Server {
	buildInfo := &run.BuildInfo{
		Version: "testServer",
		Commit:  "testCommit",
		Branch:  "testBranch",
	}
	srv, _ := run.NewServer(c, buildInfo)
	s := Server{
		Server: srv,
		Config: c,
	}
	s.TSDBStore.EngineOptions.Config = c.Data
	configureLogging(&s)
	return &s
}
Ejemplo n.º 6
0
// OpenServerWithVersion opens a test server with a specific version.
func OpenServerWithVersion(c *run.Config, version string) *Server {
	buildInfo := &run.BuildInfo{
		Version: version,
		Commit:  "",
		Branch:  "",
	}
	srv, _ := run.NewServer(c, buildInfo)
	s := Server{
		Server: srv,
		Config: c,
	}
	configureLogging(&s)
	if err := s.Open(); err != nil {
		panic(err.Error())
	}

	return &s
}