Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTracing ¶
InitTracing handles the common tracing setup functionality, and keeps implementation specific (Jaeger) configuration here.
func SafePayload ¶
SafePayload is a helper function for ensuring strings meant to be used in Spans are kept to a reasonable size. The Jaeger UDP client will be unable to send spans that are too large. This value is somewhere in the ballpark of 64K bytes. We will limit large strings to a reasonable size, say 50K bytes.
This isn't a silver bullet, however. There's nothing preventing you from using multiple strings from this function and still overloading a Span. Generally, strings from this function should only be used once - i.e. to describe a payload that contains logs from a failed pod
Types ¶
type AntidoteService ¶
type AntidoteService interface {
Start() error
}
type LessonScheduleRequest ¶
type LessonScheduleRequest struct { Operation OperationType LiveLessonID string LiveSessionID string // The fields below should eventually be deprecated. Really, all we need in an LSR are IDs for the relevant state // (livelessons, livesessions) and the operation that's taking place. All state should be retrieved // via lookup with the provided IDs // // However, it doesn't seem to be causing huge problems at the moment, so this is a low priority. LessonSlug string Stage int32 }
type OperationType ¶
type OperationType int32
const ( OperationType_CREATE OperationType = 1 OperationType_DELETE OperationType = 2 OperationType_MODIFY OperationType = 3 OperationType_BOOP OperationType = 4 LsrIncoming = "antidote.lsr.incoming" LsrCompleted = "antidote.lsr.completed" )
type TraceMsg ¶
TraceMsg will be used as an io.Writer and io.Reader for the span's context and the payload. The span will have to be written first and read first.
func NewTraceMsg ¶
func NewTraceMsg(m *nats.Msg) *TraceMsg
NewTraceMsg creates a trace msg from a NATS message's data payload.