Documentation
¶
Index ¶
- Constants
- func GetCurrentSQLTimestamp() string
- func GetSQLTimestamp(t time.Time) string
- type ClaimResponseT
- type ClaimT
- type MessageT
- type NotificationT
- type PgNotifierT
- func (notifier PgNotifierT) AddTopic(topic string) (err error)
- func (notifier *PgNotifierT) Claim(workerID string) (claim ClaimT, claimed bool)
- func (notifier *PgNotifierT) Publish(topic string, messages []MessageT) (ch chan []ResponseT, err error)
- func (notifier *PgNotifierT) Subscribe(topic string) (ch chan NotificationT, err error)
- type ResponseT
Constants ¶
View Source
const ( WaitingState = "waiting" ExecutingState = "executing" SucceededState = "succeeded" FailedState = "failed" AbortedState = "aborted" )
Variables ¶
This section is empty.
Functions ¶
func GetCurrentSQLTimestamp ¶
func GetCurrentSQLTimestamp() string
GetCurrentSQLTimestamp to get sql complaint current datetime string
func GetSQLTimestamp ¶
GetSQLTimestamp to get sql complaint current datetime string from the given duration
Types ¶
type ClaimResponseT ¶
type ClaimResponseT struct {
Payload json.RawMessage
Err error
}
type ClaimT ¶
type ClaimT struct {
ID int64
BatchID string
Status string
Payload json.RawMessage
ClaimResponseChan chan ClaimResponseT
}
type MessageT ¶
type MessageT struct {
Payload json.RawMessage
}
type NotificationT ¶
type PgNotifierT ¶
type PgNotifierT struct {
URI string
// contains filtered or unexported fields
}
func New ¶
func New(connectionInfo string) (notifier PgNotifierT, err error)
func (PgNotifierT) AddTopic ¶
func (notifier PgNotifierT) AddTopic(topic string) (err error)
func (*PgNotifierT) Claim ¶
func (notifier *PgNotifierT) Claim(workerID string) (claim ClaimT, claimed bool)
func (*PgNotifierT) Publish ¶
func (notifier *PgNotifierT) Publish(topic string, messages []MessageT) (ch chan []ResponseT, err error)
func (*PgNotifierT) Subscribe ¶
func (notifier *PgNotifierT) Subscribe(topic string) (ch chan NotificationT, err error)
type ResponseT ¶
type ResponseT struct {
Status string
Payload json.RawMessage
}
Click to show internal directories.
Click to hide internal directories.