Documentation
¶
Index ¶
- type PubSub
- type PubSubOpt
- func WithPubSubLogger(l *zerolog.Logger) PubSubOpt
- func WithPubSubPassword(password string) PubSubOpt
- func WithPubSubSubjectPrefix(prefix string) PubSubOpt
- func WithPubSubTLSEnabled(enabled bool) PubSubOpt
- func WithPubSubTLSRootCAFile(path string) PubSubOpt
- func WithPubSubURL(url string) PubSubOpt
- func WithPubSubUsername(username string) PubSubOpt
- type PubSubOpts
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 WithPubSubTLSEnabled ¶ added in v0.105.1
WithPubSubTLSEnabled requires TLS with a TLS-first handshake (the server must enable handshake_first). Verification uses the system roots unless a root CA file is set.
func WithPubSubTLSRootCAFile ¶ added in v0.105.1
WithPubSubTLSRootCAFile sets a PEM CA bundle for server verification. Requires WithPubSubTLSEnabled(true).
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
}