-
Notifications
You must be signed in to change notification settings - Fork 838
/
Message.cs
31 lines (24 loc) · 885 Bytes
/
Message.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Yarp.ReverseProxy.Configuration;
namespace Yarp.Kubernetes.Protocol;
public enum MessageType
{
Heartbeat,
Update,
Remove,
}
#pragma warning disable CA1815 // Override equals and operator equals on value types
public struct Message
#pragma warning restore CA1815 // Override equals and operator equals on value types
{
[JsonConverter(typeof(JsonStringEnumConverter))]
public MessageType MessageType { get; set; }
public string Key { get; set; }
#pragma warning disable CA2227 // Collection properties should be read only
public List<RouteConfig> Routes { get; set; }
public List<ClusterConfig> Cluster { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
}