Files
threshold/internal/servers/query.go
T
Jeff Mitchell 717a3b52ee Add worker tagging (#862)
This allows workers to have tags assigned to them, which can then be filtered to control which targets they are allowed to serve.
2021-01-21 16:27:20 -05:00

19 lines
385 B
Go

package servers
const (
serverUpsertQuery = `
insert into server
(private_id, type, description, address, update_time)
values
($1, $2, $3, $4, $5)
on conflict on constraint server_pkey
do update set
type = $2,
description = $3,
address = $4,
update_time = $5;
`
deleteWhereCreateTimeSql = `create_time < $1`
deleteTagsSql = `server_id = $1`
)