Documentation
¶
Overview ¶
Package message provides wrapper structs and helper methods to pipe actual database documents throughout transporter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandType ¶
type CommandType int
CommandType represents the different Commands capable of being executed against a database.
const ( // Flush is interpreted by the recieving sink adaptors to attempt to flush all buffered // operations to the database. This can be useful when switching from a copy to a tail operation Flush CommandType = iota )
Transporter understands the following different command types
type Msg ¶
type Msg struct {
Timestamp int64
Op OpType
ID interface{}
OriginalID interface{}
// contains filtered or unexported fields
}
A Msg serves to wrap the actual document to provide additional metadata about the document being transported.
func (*Msg) DocumentWithID ¶
DocumentWithID returns the document with the id field attached to the specified key
func (*Msg) SetDocument ¶
SetDocument will set the document variable and extract out the id and preserve it
type OpType ¶
type OpType int
OpType represents the many different Operations being performed against a document (i.e. Insert, Update, etc.)
messages refer to specific types database operations which are enumerated here.
func OpTypeFromString ¶
OpTypeFromString returns the constant representing the passed in string