diff --git a/internal/edge/client.go b/internal/edge/client.go index b1c411d..b983501 100644 --- a/internal/edge/client.go +++ b/internal/edge/client.go @@ -18,6 +18,7 @@ import ( const EVENT_SET_WARRANTS = "set_warrants" const EVENT_DEL_WARRANTS = "del_warrants" const EVENT_RESET_WARRANTS = "reset_warrants" +const EVENT_SHUTDOWN = "shutdown" type ClientConfig struct { ApiKey string @@ -139,6 +140,8 @@ func (client *Client) processEvent(event *sse.Event) { err = client.processDelWarrants(event) case EVENT_RESET_WARRANTS: err = client.initialize() + case EVENT_SHUTDOWN: + log.Fatal("Shutdown event received. Shutting down.") } if err != nil {