Documentation ¶
Index ¶
- Constants
- type AuthenticatedMessage
- type BaseChannelMessage
- type BaseControlMessage
- type BaseJSONChannelMessage
- type BaseJSONMessage
- type BaseMessage
- type BinaryPayload
- type ChannelMessage
- type DataMessage
- type ErrorContext
- type ErrorMessage
- type EventMessage
- type ExpiredTSIDMessage
- type InfoMessage
- type JSONMessage
- type JobDetectedLagContents
- type JobInitialMaxDelayContents
- type JobRunningResolutionContents
- type JobStartControlMessage
- type Message
- type MessageBlock
- type MetadataMessage
- type MetadataProperties
- type TimestampedMessage
- type ValType
Constants ¶
View Source
const ( StreamStartEvent = "STREAM_START" JobStartEvent = "JOB_START" JobProgressEvent = "JOB_PROGRESS" ChannelAbortEvent = "CHANNEL_ABORT" EndOfChannelEvent = "END_OF_CHANNEL" )
The event types used in the control-message messages. This are not used for "event" type messages.
View Source
const ( JobRunningResolution = "JOB_RUNNING_RESOLUTION" JobDetectedLag = "JOB_DETECTED_LAG" JobInitialMaxDelay = "JOB_INITIAL_MAX_DELAY" )
View Source
const ( AuthenticatedType = "authenticated" ControlMessageType = "control-message" ErrorType = "error" MetadataType = "metadata" MessageType = "message" DataType = "data" EventType = "event" WebsocketErrorType = "websocket-error" ExpiredTSIDType = "expired-tsid" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticatedMessage ¶
type AuthenticatedMessage struct { BaseJSONMessage OrgID string `json:"orgId"` UserID string `json:"userId"` }
type BaseChannelMessage ¶
type BaseChannelMessage struct {
Chan string `json:"channel,omitempty"`
}
func (*BaseChannelMessage) Channel ¶
func (bcm *BaseChannelMessage) Channel() string
type BaseControlMessage ¶
type BaseControlMessage struct { BaseJSONChannelMessage TimestampedMessage Event string `json:"event"` }
type BaseJSONChannelMessage ¶
type BaseJSONChannelMessage struct { BaseJSONMessage BaseChannelMessage }
func (*BaseJSONChannelMessage) String ¶
func (j *BaseJSONChannelMessage) String() string
type BaseJSONMessage ¶
type BaseJSONMessage struct { BaseMessage // contains filtered or unexported fields }
func (*BaseJSONMessage) JSONBase ¶
func (bjm *BaseJSONMessage) JSONBase() *BaseJSONMessage
func (*BaseJSONMessage) RawData ¶
func (j *BaseJSONMessage) RawData() map[string]interface{}
The raw message deserialized from JSON. Only applicable for JSON Useful if the message type doesn't have a concrete struct type implemented in this library (e.g. due to an upgrade to the SignalFlow protocol).
func (*BaseJSONMessage) String ¶
func (j *BaseJSONMessage) String() string
type BaseMessage ¶
type BaseMessage struct {
Typ string `json:"type"`
}
func (*BaseMessage) Base ¶
func (bm *BaseMessage) Base() *BaseMessage
func (*BaseMessage) String ¶
func (bm *BaseMessage) String() string
func (*BaseMessage) Type ¶
func (bm *BaseMessage) Type() string
type BinaryPayload ¶
func (*BinaryPayload) Float64 ¶
func (bp *BinaryPayload) Float64() float64
func (*BinaryPayload) Int32 ¶
func (bp *BinaryPayload) Int32() int32
func (*BinaryPayload) Int64 ¶
func (bp *BinaryPayload) Int64() int64
func (*BinaryPayload) Value ¶
func (bp *BinaryPayload) Value() interface{}
Value returns the numeric value as an interface{}.
type ChannelMessage ¶
type ChannelMessage interface {
Channel() string
}
type DataMessage ¶
type DataMessage struct { BaseMessage BaseChannelMessage TimestampedMessage Payloads []BinaryPayload }
DataMessage is a set of datapoints that share a common timestamp
func (*DataMessage) String ¶
func (dm *DataMessage) String() string
type ErrorContext ¶
type ErrorMessage ¶
type ErrorMessage struct { BaseJSONChannelMessage Context ErrorContext `json:"context"` Error int `json:"error"` ErrorType string `json:"errorType"` Message string `json:"message"` }
type EventMessage ¶
type EventMessage struct {
BaseJSONChannelMessage
}
type ExpiredTSIDMessage ¶
type ExpiredTSIDMessage struct { BaseJSONChannelMessage TSID string `json:"tsId"` }
ExpiredTSIDMessage is received when a timeseries has expired and is no longer relvant to a computation.
type InfoMessage ¶
type InfoMessage struct { BaseJSONChannelMessage LogicalTimestampMillis uint64 `json:"logicalTimestampMs"` MessageBlock `json:"message"` }
func (*InfoMessage) LogicalTimestamp ¶
func (im *InfoMessage) LogicalTimestamp() time.Time
func (*InfoMessage) UnmarshalJSON ¶
func (im *InfoMessage) UnmarshalJSON(raw []byte) error
type JSONMessage ¶
type JSONMessage interface { Message JSONBase() *BaseJSONMessage RawData() map[string]interface{} }
type JobDetectedLagContents ¶
type JobDetectedLagContents map[string]interface{}
func (JobDetectedLagContents) LagMS ¶
func (jm JobDetectedLagContents) LagMS() int
type JobInitialMaxDelayContents ¶
type JobInitialMaxDelayContents map[string]interface{}
func (JobInitialMaxDelayContents) MaxDelayMS ¶
func (jm JobInitialMaxDelayContents) MaxDelayMS() int
type JobRunningResolutionContents ¶
type JobRunningResolutionContents map[string]interface{}
func (JobRunningResolutionContents) ResolutionMS ¶
func (jm JobRunningResolutionContents) ResolutionMS() int
type JobStartControlMessage ¶
type JobStartControlMessage struct { BaseControlMessage Handle string `json:"handle"` }
type Message ¶
type Message interface { Type() string Base() *BaseMessage }
type MessageBlock ¶
type MessageBlock struct { TimestampedMessage Code string `json:"messageCode"` Level string `json:"messageLevel"` NumInputTimeseries int `json:"numInputTimeSeries"` // If the messageCode field in the message is known, this will be an // instance that has more specific methods to access the known fields. You // can always access the original content by treating this value as a // map[string]interface{}. Contents interface{} `json:"-"` ContentsRaw map[string]interface{} `json:"contents"` }
type MetadataMessage ¶
type MetadataMessage struct { BaseJSONChannelMessage TSID idtool.ID `json:"tsId"` Properties MetadataProperties `json:"properties"` }
type MetadataProperties ¶
type MetadataProperties struct { Metric string `json:"sf_metric"` OriginatingMetric string `json:"sf_originatingMetric"` ResolutionMS int `json:"sf_resolutionMs"` CreatedOnMS int `json:"sf_createdOnMs"` // Additional SignalFx-generated properties about this time series. Many // of these are exposed directly in fields on this struct. InternalProperties map[string]interface{} `json:"-"` // Custom properties applied to the timeseries through various means, // including dimensions, properties on matching dimensions, etc. CustomProperties map[string]string `json:"-"` }
func (*MetadataProperties) UnmarshalJSON ¶
func (mp *MetadataProperties) UnmarshalJSON(b []byte) error
type TimestampedMessage ¶
type TimestampedMessage struct {
TimestampMillis uint64 `json:"timestampMs"`
}
func (*TimestampedMessage) Timestamp ¶
func (tsm *TimestampedMessage) Timestamp() time.Time
Click to show internal directories.
Click to hide internal directories.