Skip to content
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

Allow port configuration, refactor start actor modal #73

Merged
merged 6 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ npm-debug.log
*.so

.elixir_ls/

# Stop committing temporary files
*.tmp
173 changes: 0 additions & 173 deletions wasmcloud_host/assets/vendor/wasmcloud/js/wasmcloud.js

This file was deleted.

5 changes: 5 additions & 0 deletions wasmcloud_host/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ config :logger, :console,
# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason

# Allow wasm uploads
config :mime, :types, %{
brooksmtownsend marked this conversation as resolved.
Show resolved Hide resolved
"application/wasm" => ["wasm"]
}

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
2 changes: 1 addition & 1 deletion wasmcloud_host/config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Mix.Config
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :wasmcloud_host, WasmcloudHostWeb.Endpoint,
http: [port: 4000],
http: [port: System.get_env("PORT") || 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
Expand Down
42 changes: 42 additions & 0 deletions wasmcloud_host/lib/wasmcloud_host/lattice/state_monitor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,48 @@ defmodule WasmcloudHost.Lattice.StateMonitor do
%State{state | providers: providers}
end

defp process_event(
state,
%Cloudevents.Format.V_1_0.Event{
data: %{"actors" => _actors, "providers" => _providers},
datacontenttype: "application/json",
source: _source_host,
type: "com.wasmcloud.lattice.host_heartbeat"
}
) do
Logger.info("Handling host heartbeat")
# TODO: handle heartbeats
state
end

defp process_event(
state,
%Cloudevents.Format.V_1_0.Event{
data: %{"public_key" => _pkey},
datacontenttype: "application/json",
source: _source_host,
type: "com.wasmcloud.lattice.health_check_passed"
}
) do
Logger.info("Handling heartbeat success")
brooksmtownsend marked this conversation as resolved.
Show resolved Hide resolved
# TODO: handle heartbeats
state
end

defp process_event(
state,
%Cloudevents.Format.V_1_0.Event{
data: %{"public_key" => _pkey},
datacontenttype: "application/json",
source: _source_host,
type: "com.wasmcloud.lattice.health_check_failed"
}
) do
Logger.info("Handling heartbeat failure")
brooksmtownsend marked this conversation as resolved.
Show resolved Hide resolved
# TODO: handle heartbeats
state
end

# This map is keyed by provider public key, which contains a list of
# maps with the keys "link_name", "contract_id", and "host_ids", as
# shown below.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.