Documentation ¶
Overview ¶
Package pubsub provides a notifier that subscribes to an PubSub topic that watches change of configuration on GCP.
It requires following roles on the target project:
- roles/pubsub.editor
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier that watches change events on given PubSub topic.
To create a new Notifier, call NewNotifier.
func NewNotifier ¶
NewNotifier creates a Notifier with the given PubSub topic.
type Option ¶
type Option = option.ClientOption
Option configures the Notifier with specific options.
func WithLogHandler ¶
WithLogHandler provides the slog.Handler for logs from notifier.
By default, it uses handler from slog.Default().
func WithProject ¶
WithProject provides GCP project ID.
By default, it fetches project ID from metadata server.
Click to show internal directories.
Click to hide internal directories.