Documentation
¶
Index ¶
Constants ¶
View Source
const (
OverID = "_OVER_" // 事件结束 ID
)
Variables ¶
View Source
var (
ErrPublisherNotFound = errors.New("publisher not found")
)
Functions ¶
func RegisterPublisher ¶
Types ¶
type Event ¶
type Event struct {
ID string `json:"id"`
Schema string `json:"schema"`
Table string `json:"table"`
Action string `json:"action"`
Data map[string]interface{} `json:"data"`
CommitTime time.Time `json:"commit_time"`
}
Event event structure for publishing to the NATS server.
func (Event) GetSubject ¶
GetSubject creates subject name from the prefix, schema and table name.
func (Event) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Event) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Event) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Event) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.