Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
PubSub implements msgqueue.PubSub over core NATS. Subjects are subjectPrefix + "." + topic.Name() (default prefix "hatchet.pubsub"), delivery is best-effort at-most-once.
func NewPubSub ¶
NewPubSub connects synchronously to NATS and returns a PubSub. Fails if the server is unreachable or if its max_payload is below msgqueue.MaxMessageSize.
type PubSubOpt ¶
type PubSubOpt func(*PubSubOpts)
func WithPubSubLogger ¶
func WithPubSubPassword ¶
WithPubSubPassword sets the NATS password for nats.UserInfo.
func WithPubSubSubjectPrefix ¶
WithPubSubSubjectPrefix sets the NATS subject prefix (default "hatchet.pubsub"). Empty falls back to the default. No trimming or validation: a bad prefix fails loudly via nats ErrBadSubject at startup.
func WithPubSubURL ¶
WithPubSubURL sets the NATS seed URL(s). Comma-separated lists are passed through to nats.go. Prefer bare hosts and set Username/Password so rediscovered cluster peers authenticate.
func WithPubSubUsername ¶
WithPubSubUsername sets the NATS username for nats.UserInfo.
type PubSubOpts ¶
type PubSubOpts struct {
// contains filtered or unexported fields
}