pubsub

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pubsub wraps nats calls

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidActorURN      = errors.New("invalid actor urn")
	ErrInvalidTenantURN     = errors.New("invalid tenant urn")
	ErrInvalidAssignmentURN = errors.New("invalid assignment urn")
	ErrInvalidURN           = errors.New("invalid urn")
)

nolint

Functions

func NewAssignmentMessage

func NewAssignmentMessage(actorURN string, tenantURN string, assignmentURN string, additionalSubjectURNs ...string) (*pubsubx.Message, error)

NewAssignmentMessage creates a new assignment message

func NewAssignmentURN

func NewAssignmentURN(assignmentID string) string

NewAssignmentURN creates a new assignment URN

func NewLoadBalancerMessage

func NewLoadBalancerMessage(actorURN string, tenantURN string, loadBalancerURN string, additionalSubjectURNs ...string) (*pubsubx.Message, error)

NewLoadBalancerMessage creates a new loadbalancer message

func NewLoadBalancerURN

func NewLoadBalancerURN(loadBalancerID string) string

NewLoadBalancerURN creates a new loadbalancer URN

func PublishCreate

func PublishCreate(ctx context.Context, js nats.JetStreamContext, actor, location string, data *pubsubx.Message) error

PublishCreate publishes a create event

func PublishDelete

func PublishDelete(ctx context.Context, js nats.JetStreamContext, actor, location string, data *pubsubx.Message) error

PublishDelete publishes a delete event

func PublishUpdate

func PublishUpdate(ctx context.Context, js nats.JetStreamContext, actor, location string, data *pubsubx.Message) error

PublishUpdate publishes an update event

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL