Documentation
¶
Overview ¶
Copyright 2019 txn2
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 txn2 ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 txn2 ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 txn2 ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func HealthzHandler() func(c *gin.Context)
- func NoRouteHandler() func(c *gin.Context)
- type Ack
- type Client
- type ClientCfg
- type GinAck
- func (ga *GinAck) GinErrorAbort(ServerCode int, errorCode string, errorMessage string)
- func (ga *GinAck) GinSend(payload interface{})
- func (ga *GinAck) MakeError(ServerCode int, errorCode string, errorMessage string)
- func (ga *GinAck) SetPayload(payload interface{})
- func (ga *GinAck) SetPayloadType(payloadType string)
- func (ga *GinAck) UnmarshalAbort(data []byte, v interface{}) error
- func (ga *GinAck) UnmarshalPostAbort(v interface{}) error
- type MappedMetricFamily
- type Server
- type ServerCfg
Constants ¶
const VERSION = 8
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ack ¶
type Ack struct {
Version int `json:"ack_version"`
Agent string `json:"agent"`
SrvEnv string `json:"srv_env"`
SrvNS string `json:"srv_ns"`
Uuid string `json:"ack_uuid"`
RequestUuid string `json:"req_uuid"`
DateTime string `json:"date_time"`
Success bool `json:"success"`
ErrorCode string `json:"error_code"`
ErrorMessage string `json:"error_message"`
ServerCode int `json:"server_code"`
Location string `json:"location"`
PayloadType string `json:"payload_type"`
Payload interface{} `json:"payload"`
Duration string `json:"duration"`
// contains filtered or unexported fields
}
Ack
type ClientCfg ¶ added in v1.8.2
type ClientCfg struct {
MaxIdleConnsPerHost int // 10 connections
DialContextTimeout int // 10 seconds
NetTimeout int // 10 seconds
ConTimeout int // 60 seconds
}
ClientCfg
type GinAck ¶
type GinAck struct {
Ack Ack
// contains filtered or unexported fields
}
GinAck
func (*GinAck) GinErrorAbort ¶
GinError aborts gin context with JSON error
func (*GinAck) GinSend ¶
func (ga *GinAck) GinSend(payload interface{})
GinSend responds with JSON on the gin context
func (*GinAck) UnmarshalAbort ¶
UnmarshalAbort unmarshals data and aborts if it can not.
func (*GinAck) UnmarshalPostAbort ¶
UnmarshalPostAbort unmarshal raw data posted through gin or aborts.
type MappedMetricFamily ¶
type MappedMetricFamily map[string]*io_prometheus_client.MetricFamily
MappedMetricFamily
