|
| 1 | +package tc |
| 2 | + |
| 3 | +/* |
| 4 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 5 | + * or more contributor license agreements. See the NOTICE file |
| 6 | + * distributed with this work for additional information |
| 7 | + * regarding copyright ownership. The ASF licenses this file |
| 8 | + * to you under the Apache License, Version 2.0 (the |
| 9 | + * "License"); you may not use this file except in compliance |
| 10 | + * with the License. You may obtain a copy of the License at |
| 11 | + * |
| 12 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | + * |
| 14 | + * Unless required by applicable law or agreed to in writing, |
| 15 | + * software distributed under the License is distributed on an |
| 16 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 17 | + * KIND, either express or implied. See the License for the |
| 18 | + * specific language governing permissions and limitations |
| 19 | + * under the License. |
| 20 | + */ |
| 21 | + |
| 22 | +// Health monitor checks for servers |
| 23 | +// A Single Servercheck Response for Update and Create to depict what changed |
| 24 | +// swagger:response ServercheckResponse |
| 25 | +// in: body |
| 26 | +type ServercheckResponse struct { |
| 27 | + // in: body |
| 28 | + Response Servercheck `json:"response"` |
| 29 | +} |
| 30 | + |
| 31 | +// A list of Servercheck Responses |
| 32 | +// swagger:response ServerchecksResponse |
| 33 | +// in: body |
| 34 | +type ServerchecksResponse struct { |
| 35 | + // in: body |
| 36 | + Response []Servercheck `json:"response"` |
| 37 | +} |
| 38 | + |
| 39 | +// A Single Servercheck struct for GET response |
| 40 | +// swagger:model Servercheck |
| 41 | +type Servercheck struct { |
| 42 | + |
| 43 | + // The Servercheck response data |
| 44 | + // |
| 45 | + // Admin state of the checked server |
| 46 | + AdminState string `json:"adminState"` |
| 47 | + |
| 48 | + // Cache group the checked server belongs to |
| 49 | + CacheGroup string `json:"cacheGroup"` |
| 50 | + |
| 51 | + // ID number of the checked server |
| 52 | + ID int `json:"id"` |
| 53 | + |
| 54 | + // Hostname of the checked server |
| 55 | + HostName string `json:"hostName"` |
| 56 | + |
| 57 | + // Reval pending flag for checked server |
| 58 | + RevalPending bool `json:"revalPending"` |
| 59 | + |
| 60 | + // Profile name of checked server |
| 61 | + Profile string `json:"profile"` |
| 62 | + |
| 63 | + // Traffic Control type of the checked server |
| 64 | + Type string `json:"type"` |
| 65 | + |
| 66 | + // Update pending flag for the checked server |
| 67 | + UpdPending bool `json:"updPending"` |
| 68 | + |
| 69 | + // Various check types |
| 70 | + Checks struct { |
| 71 | + |
| 72 | + // IPv4 production interface (legacy name) |
| 73 | + Iface10G int `json:"10G"` |
| 74 | + |
| 75 | + // IPv6 production interface (legacy name) |
| 76 | + Iface10G6 int `json:"10G6"` |
| 77 | + |
| 78 | + // Cache Disk Usage |
| 79 | + CDU int `json:"CDU"` |
| 80 | + |
| 81 | + // Cache Hit Ratio |
| 82 | + CHR int `json:"CHR"` |
| 83 | + |
| 84 | + // DSCP check |
| 85 | + DSCP int `json:"DSCP"` |
| 86 | + |
| 87 | + // DNS check |
| 88 | + FQDN int `json:"FQDN"` |
| 89 | + |
| 90 | + // Out-of-band (BMC) interface check |
| 91 | + ILO int `json:"ILO"` |
| 92 | + |
| 93 | + // IPv4 production interface (new name) |
| 94 | + IPv4 int `json:"IPv4"` |
| 95 | + |
| 96 | + // IPv6 production interface (new name) |
| 97 | + IPv6 int `json:"IPv6"` |
| 98 | + |
| 99 | + // MTU check |
| 100 | + MTU int `json:"MTU"` |
| 101 | + |
| 102 | + // ORT check |
| 103 | + ORT int `json:"ORT"` |
| 104 | + |
| 105 | + // Traffic Router status for checked server |
| 106 | + RTR int `json:"RTR"` |
| 107 | + } `json:"checks"` |
| 108 | +} |
| 109 | + |
| 110 | +// A Single Servercheck struct for Update and Create to depict what changed |
| 111 | +// swagger:model ServercheckPost |
| 112 | +type ServercheckPost struct { |
| 113 | + |
| 114 | + // The Servercheck data to submit |
| 115 | + // |
| 116 | + // Name of the server check type |
| 117 | + // |
| 118 | + // required: true |
| 119 | + Name string `json:"servercheck_short_name" db:"servercheck_short_name"` |
| 120 | + |
| 121 | + // ID of the server |
| 122 | + // |
| 123 | + // required: true |
| 124 | + ID int `json:"id" db:"id"` |
| 125 | + |
| 126 | + // Name of the server |
| 127 | + HostName string `json:"name" db:"name"` |
| 128 | + |
| 129 | + // Value of the check result |
| 130 | + // |
| 131 | + // required: true |
| 132 | + Value int `json:"value" db:"value"` |
| 133 | +} |
| 134 | + |
| 135 | +type ServercheckPostNullable struct { |
| 136 | + Name string `json:"servercheck_short_name" db:"servercheck_short_name"` |
| 137 | + ID int `json:"id" db:"id"` |
| 138 | + Value int `json:"value" db:"value"` |
| 139 | +} |
| 140 | + |
| 141 | +type ServercheckPostResponse struct { |
| 142 | + Alerts []Alert `json:"alerts"` |
| 143 | + Response DeliveryServiceUserPost `json:"response"` |
| 144 | +} |
0 commit comments