mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-27 15:41:41 +01:00
fix(provider): use Actor.Attributes["name"] instead of deprecated From
This commit is contained in:
@@ -121,7 +121,7 @@ func (provider *DockerClassicProvider) NotifyInsanceStopped(ctx context.Context,
|
||||
select {
|
||||
case msg := <-msgs:
|
||||
// Send the container that has died to the channel
|
||||
instance <- msg.From
|
||||
instance <- msg.Actor.Attributes["name"]
|
||||
case err := <-errs:
|
||||
if errors.Is(err, io.EOF) {
|
||||
log.Debug("provider event stream closed")
|
||||
|
||||
@@ -187,6 +187,12 @@ func ContainerStoppedEvent(name string) events.Message {
|
||||
Scope: "local",
|
||||
Action: "stop",
|
||||
Type: "container",
|
||||
Actor: events.Actor{
|
||||
ID: "randomid",
|
||||
Attributes: map[string]string{
|
||||
"name": name,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user