Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReadTimeout = 5
ReadTimeout specifies the time, in seconds, the streams wait for reading the next message.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { CheckID string `json:"check_id,omitempty"` AgentID string `json:"agent_id,omitempty"` ScanID string `json:"scan_id,omitempty"` Action string `json:"action"` }
Message describes a stream message.
type MsgProcessor ¶
type MsgProcessor interface {
AbortCheck(ID string)
}
MsgProcessor defines the function that the Stream will call when an abort message has been received.
type Retryer ¶
Retryer represents the functions used by the Stream for retrying when connecting to the stream.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream reads messages from the stream server and process them using a given message processor.
type WSDialerWithRetries ¶
WSDialerWithRetries provides retries with backoff and jitter when initiating a connection to a websocket.
func NewWSDialerWithRetries ¶
NewWSDialerWithRetries creates a WSDialer with the given retries parameters.
Click to show internal directories.
Click to hide internal directories.