Documentation
¶
Index ¶
- Constants
- Variables
- func CheckTopic(svc *sns.SNS, arn string) error
- func DecodePGEvent(encoded string) (aggId string, version int, payload []byte, typecode string, ...)
- func EncodePGEvent(aggId string, version int, payload []byte, typecode string, ...) string
- func PublishEvents(publisher *EventStorePublisher)
- func SetLogLevel(logLevelEnvVarName string, env *envinject.InjectedEnv) error
- type Event2Publish
- type EventStorePublisher
- func (e2p *EventStorePublisher) AggsWithEvents() ([]Event2Publish, error)
- func (e2p *EventStorePublisher) GetTableLock() (bool, error)
- func (e2p *EventStorePublisher) InitMetricsSink()
- func (e2p *EventStorePublisher) PublishEvent(e2pub *Event2Publish) error
- func (e2p *EventStorePublisher) ReleaseTableLock() error
Constants ¶
View Source
const ( TopicARN = "TOPIC_ARN" LogLevel = "PG_PUBLISH_LOG_LEVEL" MetricsDumpInterval = 1 * time.Minute PublishEnabled = "PG_PUBLISH_ENABLED" )
Variables ¶
View Source
var (
ErrDecodingEvent = errors.New("Error Decoding PG Event")
)
Functions ¶
func DecodePGEvent ¶
func EncodePGEvent ¶
func PublishEvents ¶
func PublishEvents(publisher *EventStorePublisher)
func SetLogLevel ¶
func SetLogLevel(logLevelEnvVarName string, env *envinject.InjectedEnv) error
SetLogLevel sets the log level reading the level to use from the envrionment using the given environment variable name
Types ¶
type Event2Publish ¶
type EventStorePublisher ¶
type EventStorePublisher struct {
// contains filtered or unexported fields
}
func NewEvents2Pub ¶
func (*EventStorePublisher) AggsWithEvents ¶
func (e2p *EventStorePublisher) AggsWithEvents() ([]Event2Publish, error)
func (*EventStorePublisher) GetTableLock ¶
func (e2p *EventStorePublisher) GetTableLock() (bool, error)
func (*EventStorePublisher) InitMetricsSink ¶
func (e2p *EventStorePublisher) InitMetricsSink()
func (*EventStorePublisher) PublishEvent ¶
func (e2p *EventStorePublisher) PublishEvent(e2pub *Event2Publish) error
func (*EventStorePublisher) ReleaseTableLock ¶
func (e2p *EventStorePublisher) ReleaseTableLock() error
Click to show internal directories.
Click to hide internal directories.