-
Notifications
You must be signed in to change notification settings - Fork 894
feat: Add external provisioner daemons #4935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
48fcf30
1497980
3022f7b
59b842b
3f0738e
0d29eaf
3033c58
4326816
b1ce65b
e97287f
5255b13
cf1221b
7dda3a2
200e652
29f6f49
ac853f1
4b965f4
d218655
b21004f
ea94e1b
2ea0c9f
e9b8e2d
d1f31f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"codersdk", | ||
"cronstrue", | ||
"databasefake", | ||
"dbtype", | ||
"DERP", | ||
"derphttp", | ||
"derpmap", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package dbtype | ||
|
||
import ( | ||
"database/sql/driver" | ||
"encoding/json" | ||
|
||
"golang.org/x/xerrors" | ||
) | ||
|
||
type Map map[string]string | ||
|
||
func (m Map) Scan(src interface{}) error { | ||
if src == nil { | ||
return nil | ||
} | ||
switch src := src.(type) { | ||
case []byte: | ||
err := json.Unmarshal(src, &m) | ||
if err != nil { | ||
return err | ||
} | ||
default: | ||
return xerrors.Errorf("unsupported Scan, storing driver.Value type %T into type %T", src, m) | ||
} | ||
return nil | ||
} | ||
|
||
func (m Map) Value() (driver.Value, error) { | ||
return json.Marshal(m) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
ALTER TABLE provisioner_daemons ADD COLUMN tags jsonb; | ||
|
||
ALTER TABLE template_versions ADD COLUMN provisioner_tags jsonb; | ||
ALTER TABLE provisioner_daemons ADD COLUMN tags jsonb NOT NULL DEFAULT '{}'; | ||
ALTER TABLE provisioner_jobs ADD COLUMN tags jsonb NOT NULL DEFAULT '{}'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.