Documentation ¶
Index ¶
- Constants
- Variables
- func AppendHTTPListenerError(httpListenerReport *validation.HttpListenerReport, ...)
- func AppendListenerError(listenerReport *validation.ListenerReport, ...)
- func AppendRouteError(routeReport *validation.RouteReport, errType validation.RouteReport_Error_Type, ...)
- func AppendRouteWarning(routeReport *validation.RouteReport, ...)
- func AppendTCPListenerError(tcpListenerReport *validation.TcpListenerReport, ...)
- func AppendTcpHostWarning(tcpHostReport *validation.TcpHostReport, ...)
- func AppendVirtualHostError(virtualHostReport *validation.VirtualHostReport, ...)
- func GetHttpListenerErr(httpListener *validation.HttpListenerReport) []error
- func GetListenerErr(listener *validation.ListenerReport) []error
- func GetListenerError(listener *validation.ListenerReport) []error
- func GetProxyError(proxyRpt *validation.ProxyReport) error
- func GetProxyWarning(proxyRpt *validation.ProxyReport) []string
- func GetRouteErr(route *validation.RouteReport) []error
- func GetRouteWarning(route *validation.RouteReport) []string
- func GetTcpHostErr(tcpHost *validation.TcpHostReport) []error
- func GetTcpHostWarning(tcpHost *validation.TcpHostReport) []string
- func GetTcpListenerErr(tcpListener *validation.TcpListenerReport) []error
- func GetVirtualHostErr(virtualHost *validation.VirtualHostReport) []error
- func MakeReport(proxy *v1.Proxy) *validation.ProxyReport
- type ErrorLevelContext
- type ErrorWithKnownLevel
- type TcpHostWarning
Constants ¶
View Source
const ( ErrorLevels_WARNING string = "WARNING" ErrorLevels_ERROR string = "ERROR" )
Variables ¶
View Source
var ( RouteErrorMsg = "Route Error" RouteIdentifierTxt = "Route Name" )
Functions ¶
func AppendHTTPListenerError ¶
func AppendHTTPListenerError(httpListenerReport *validation.HttpListenerReport, errType validation.HttpListenerReport_Error_Type, reason string)
func AppendListenerError ¶
func AppendListenerError(listenerReport *validation.ListenerReport, errType validation.ListenerReport_Error_Type, reason string)
func AppendRouteError ¶
func AppendRouteError(routeReport *validation.RouteReport, errType validation.RouteReport_Error_Type, reason string, routeName string)
func AppendRouteWarning ¶ added in v0.20.2
func AppendRouteWarning(routeReport *validation.RouteReport, errType validation.RouteReport_Warning_Type, reason string)
func AppendTCPListenerError ¶ added in v1.9.25
func AppendTCPListenerError(tcpListenerReport *validation.TcpListenerReport, errType validation.TcpListenerReport_Error_Type, reason string)
func AppendTcpHostWarning ¶ added in v1.14.12
func AppendTcpHostWarning(tcpHostReport *validation.TcpHostReport, errType validation.TcpHostReport_Warning_Type, reason string)
func AppendVirtualHostError ¶
func AppendVirtualHostError(virtualHostReport *validation.VirtualHostReport, errType validation.VirtualHostReport_Error_Type, reason string)
func GetHttpListenerErr ¶ added in v1.0.0
func GetHttpListenerErr(httpListener *validation.HttpListenerReport) []error
func GetListenerErr ¶ added in v1.0.0
func GetListenerErr(listener *validation.ListenerReport) []error
func GetListenerError ¶ added in v1.16.5
func GetListenerError(listener *validation.ListenerReport) []error
func GetProxyError ¶
func GetProxyError(proxyRpt *validation.ProxyReport) error
func GetProxyWarning ¶ added in v0.20.2
func GetProxyWarning(proxyRpt *validation.ProxyReport) []string
func GetRouteErr ¶ added in v1.0.0
func GetRouteErr(route *validation.RouteReport) []error
func GetRouteWarning ¶ added in v1.0.0
func GetRouteWarning(route *validation.RouteReport) []string
func GetTcpHostErr ¶ added in v1.0.0
func GetTcpHostErr(tcpHost *validation.TcpHostReport) []error
func GetTcpHostWarning ¶ added in v1.14.12
func GetTcpHostWarning(tcpHost *validation.TcpHostReport) []string
Extract, format and return all warnings on this TcpHost instance as a list of strings
func GetTcpListenerErr ¶ added in v1.0.0
func GetTcpListenerErr(tcpListener *validation.TcpListenerReport) []error
func GetVirtualHostErr ¶ added in v1.0.0
func GetVirtualHostErr(virtualHost *validation.VirtualHostReport) []error
func MakeReport ¶
func MakeReport(proxy *v1.Proxy) *validation.ProxyReport
Types ¶
type ErrorLevelContext ¶ added in v1.14.12
type ErrorLevelContext struct { // A given TCP listener can have multiple TCP hosts; HostNum provides the // numerical index of the host on the listener associated with the error to // be reported HostNum *int }
ErrorLevelContext carries additional information to be passed in the ErrorWithKnownLevel object
type ErrorWithKnownLevel ¶ added in v1.14.12
type ErrorWithKnownLevel interface { error // The severity of the error - should return either ErrorLevels_WARNING or // ErrorLevels_ERROR ErrorLevel() string // Additional contextual information required to report the error/warning GetContext() ErrorLevelContext // The instance of the error itself GetError() error }
Types implementing ErrorWithKnownLevel are able to report on the severity of the error they describe by evaluating ErrorLevel()
type TcpHostWarning ¶ added in v1.14.12
type TcpHostWarning struct { Err error ErrLevel string Context ErrorLevelContext }
TcpHostWarning implements ErrorWithKnownLevel; it is intended to allow reporting certain errors as warnings and others as errors, and provides the necessary context required for reporting errors as such
func (*TcpHostWarning) Error ¶ added in v1.14.12
func (tcpHostWarning *TcpHostWarning) Error() string
func (*TcpHostWarning) ErrorLevel ¶ added in v1.14.12
func (tcpHostWarning *TcpHostWarning) ErrorLevel() string
func (*TcpHostWarning) GetContext ¶ added in v1.14.12
func (tcpHostWarning *TcpHostWarning) GetContext() ErrorLevelContext
func (*TcpHostWarning) GetError ¶ added in v1.14.12
func (tcpHostWarning *TcpHostWarning) GetError() error
return the instance of the Error this object is wrapping
Click to show internal directories.
Click to hide internal directories.