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

Bonny.Server.Watcher #58

Closed
coryodaniel opened this issue Jun 25, 2019 · 0 comments · Fixed by #66
Closed

Bonny.Server.Watcher #58

coryodaniel opened this issue Jun 25, 2019 · 0 comments · Fixed by #66

Comments

@coryodaniel
Copy link
Owner

Behaviour / use macro for creating a watcher.

defmodule MyWatcher do
  use Bonny.Server.Watcher, cluster: :default
  
  @doc "Operation to watch"
  @impl true
  def operation() do
    K8s.Client.list("v1", :pods, namespaces: :all)
  end

  @doc "Resource was added"
  @impl true
  def add(resource), do: :ok

  @doc "Resource was modified"
  @impl true
  def modify(resource), do: :ok

  @doc "Resource was deleted"
  @impl true
  def delete(resource), do: :ok
end
@coryodaniel coryodaniel added this to the 0.4 milestone Jun 25, 2019
@coryodaniel coryodaniel modified the milestones: 0.4, 0.4 Internal Refactor Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant