Skip to content

Commit

Permalink
Implement transit for cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Jun 21, 2024
1 parent 31191a2 commit a3d7ca7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/polar/machines/cluster/transit.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
defimpl Eventful.Transit, for: Polar.Machines.Cluster do
def perform(cluster, user, event_name, options \\ []) do
comment = Keyword.get(options, :comment)
domain = Keyword.get(options, :domain, "transitions")
parameters = Keyword.get(options, :parameters, %{})

cluster
|> Event.handle(user, %{
domain: domain,
name: event_name,
comment: comment,
parameters: parameters
})
end
end

0 comments on commit a3d7ca7

Please sign in to comment.