Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAsyncNotifier ¶
func NewAsyncNotifier() (async.AsyncNotifier, error)
NewAsyncNotifier returns a new no-op AsyncNotifier.
Example ¶
package main
import (
"context"
"encoding/json"
"fmt"
"github.com/primandproper/platform/notifications/async"
"github.com/primandproper/platform/notifications/async/noop"
)
func main() {
notifier, err := noop.NewAsyncNotifier()
if err != nil {
panic(err)
}
err = notifier.Publish(context.Background(), "my-channel", &async.Event{
Type: "greeting",
Data: json.RawMessage(`{"message":"hello"}`),
})
fmt.Println(err)
}
Output: <nil>
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.