diff --git a/api/discovery/.air.toml b/api/discovery/.air.toml new file mode 100644 index 00000000..16f8c34b --- /dev/null +++ b/api/discovery/.air.toml @@ -0,0 +1,46 @@ +root = "." +testdata_dir = "testdata" +tmp_dir = "tmp" + +[build] + args_bin = [] + entrypoint = "./tmp/main" + cmd = "go build -o ./tmp/main ." + delay = 1000 + exclude_dir = ["assets", "tmp", "vendor", "testdata"] + exclude_file = [] + exclude_regex = ["_test.go", "_templ.go"] + exclude_unchanged = false + follow_symlink = false + full_bin = "" + include_dir = [] + include_ext = ["go", "tpl", "tmpl", "html"] + include_file = [] + kill_delay = "0s" + log = "build-errors.log" + poll = false + poll_interval = 0 + post_cmd = [] + pre_cmd = [] + rerun = false + rerun_delay = 500 + send_interrupt = false + stop_on_error = false + +[color] + app = "" + build = "yellow" + main = "magenta" + runner = "green" + watcher = "cyan" + +[log] + main_only = false + time = false + +[misc] + clean_on_exit = false + +[screen] + clear_on_rebuild = false + keep_scroll = true diff --git a/api/discovery/.gitignore b/api/discovery/.gitignore index c62beb6b..878fdf9a 100644 --- a/api/discovery/.gitignore +++ b/api/discovery/.gitignore @@ -1,3 +1,4 @@ internal/generated .gocache app +tmp \ No newline at end of file diff --git a/api/discovery/config.dev.yml b/api/discovery/config.dev.yml new file mode 100644 index 00000000..4bb17d8c --- /dev/null +++ b/api/discovery/config.dev.yml @@ -0,0 +1,21 @@ +runtime: + shutdown_timeout_seconds: 15 + +metrics: + address: ":9405" + +messaging: + driver: NATS + settings: + url_env: NATS_URL + host_env: NATS_HOST + port_env: NATS_PORT + username_env: NATS_USER + password_env: NATS_PASSWORD + broker_name: Discovery Service + max_reconnects: 10 + reconnect_wait: 5 + buffer_size: 1024 + +registry: + kv_ttl_seconds: 3600 diff --git a/api/discovery/go.mod b/api/discovery/go.mod index 3b15e4e3..a1c3f06e 100644 --- a/api/discovery/go.mod +++ b/api/discovery/go.mod @@ -1,6 +1,6 @@ module github.com/tech/sendico/discovery -go 1.25.3 +go 1.25.6 replace github.com/tech/sendico/pkg => ../pkg