mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 04:59:02 +08:00
delete test folder for interface implementation
This commit is contained in:
parent
0c7a5ce3c7
commit
dbd0701779
@ -1,20 +0,0 @@
|
|||||||
package clickhouse
|
|
||||||
|
|
||||||
type ClickHouseReader struct {
|
|
||||||
ClickHouseClientUrl string
|
|
||||||
}
|
|
||||||
|
|
||||||
func connect() string {
|
|
||||||
return "Connected to ClickHouse"
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewSpanReader() *ClickHouseReader {
|
|
||||||
connect()
|
|
||||||
return &ClickHouseReader{
|
|
||||||
ClickHouseClientUrl: "http://localhost:9000",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (chReader *ClickHouseReader) GetServices() string {
|
|
||||||
return "Hello from ClickHouse"
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
package druid
|
|
||||||
|
|
||||||
type DruidReader struct {
|
|
||||||
DruidClientUrl string
|
|
||||||
}
|
|
||||||
|
|
||||||
func connect() string {
|
|
||||||
return "Connected to Druid"
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewSpanReader() *DruidReader {
|
|
||||||
connect()
|
|
||||||
return &DruidReader{
|
|
||||||
DruidClientUrl: "http://localhost:8888",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (druidReader *DruidReader) GetServices() string {
|
|
||||||
return "Hello from Druid"
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"go.signoz.io/query-service/test/clickhouse"
|
|
||||||
"go.signoz.io/query-service/test/druid"
|
|
||||||
)
|
|
||||||
|
|
||||||
type StorageReader interface {
|
|
||||||
GetServices() string
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
storage := os.Getenv("STORAGE")
|
|
||||||
var client StorageReader
|
|
||||||
|
|
||||||
if storage == "druid" {
|
|
||||||
client = druid.NewSpanReader()
|
|
||||||
} else if storage == "clickhouse" {
|
|
||||||
client = clickhouse.NewSpanReader()
|
|
||||||
}
|
|
||||||
|
|
||||||
services := client.GetServices()
|
|
||||||
fmt.Println(services)
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user