Documentation ¶
Index ¶
- Constants
- Variables
- func IsValidWSProto(proto string) bool
- type CustomProbe
- func NewContainerProbe(xc *app.ExecutionContext, inspector *container.Inspector, ...) (*CustomProbe, error)
- func NewEndpointProbe(xc *app.ExecutionContext, targetEndpoint string, ports []uint, ...) (*CustomProbe, error)
- func NewPodProbe(xc *app.ExecutionContext, inspector *pod.Inspector, ...) (*CustomProbe, error)
- type WebsocketClient
- type WebsocketMessage
Constants ¶
View Source
const ( ProtoWS = "ws" ProtoWSS = "wss" )
View Source
const (
HeaderContentType = "Content-Type"
)
Variables ¶
View Source
var (
ErrFailOnStatus5xx = errors.New("failed on status code 5xx")
)
Functions ¶
func IsValidWSProto ¶
Types ¶
type CustomProbe ¶
type CustomProbe struct { APISpecProbes []apiSpecInfo CallCount acounter.Type ErrCount acounter.Type OkCount acounter.Type CallFailureCount acounter.Type // contains filtered or unexported fields }
CustomProbe is a custom HTTP probe
func NewContainerProbe ¶
func NewContainerProbe( xc *app.ExecutionContext, inspector *container.Inspector, opts config.HTTPProbeOptions, printState bool, ) (*CustomProbe, error)
NewContainerProbe creates a new custom HTTP probe
func NewEndpointProbe ¶
func NewEndpointProbe( xc *app.ExecutionContext, targetEndpoint string, ports []uint, opts config.HTTPProbeOptions, printState bool, ) (*CustomProbe, error)
NewEndpointProbe creates a new custom HTTP probe for an endpoint
func NewPodProbe ¶
func NewPodProbe( xc *app.ExecutionContext, inspector *pod.Inspector, opts config.HTTPProbeOptions, printState bool, ) (*CustomProbe, error)
func (*CustomProbe) Cancel ¶
func (p *CustomProbe) Cancel()
func (*CustomProbe) DoneChan ¶
func (p *CustomProbe) DoneChan() <-chan struct{}
DoneChan returns the 'done' channel for the HTTP probe instance
func (*CustomProbe) Ports ¶
func (p *CustomProbe) Ports() []string
func (*CustomProbe) Start ¶
func (p *CustomProbe) Start()
Start starts the HTTP probe instance execution
type WebsocketClient ¶
type WebsocketClient struct { OnRead func(mtype int, mdata []byte) ReadCh chan WebsocketMessage Conn *websocket.Conn ReadCount acounter.Type PongCount acounter.Type PingCount acounter.Type Addr string // contains filtered or unexported fields }
func NewWebsocketClient ¶
func NewWebsocketClient(proto, host, port string) (*WebsocketClient, error)
func (*WebsocketClient) CheckConnection ¶
func (wc *WebsocketClient) CheckConnection() error
func (*WebsocketClient) Connect ¶
func (wc *WebsocketClient) Connect() error
func (*WebsocketClient) Disconnect ¶
func (wc *WebsocketClient) Disconnect() error
func (*WebsocketClient) WriteBinary ¶
func (wc *WebsocketClient) WriteBinary(data []byte) error
func (*WebsocketClient) WriteString ¶
func (wc *WebsocketClient) WriteString(data string) error
type WebsocketMessage ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.