Documentation ¶
Overview ¶
Package pubsub wraps nats calls
Index ¶
- Variables
- func NewAssignmentMessage(actorURN string, tenantURN string, assignmentURN string, ...) (*pubsubx.Message, error)
- func NewAssignmentURN(assignmentID string) string
- func NewLoadBalancerMessage(actorURN string, tenantURN string, loadBalancerURN string, ...) (*pubsubx.Message, error)
- func NewLoadBalancerURN(loadBalancerID string) string
- func PublishCreate(ctx context.Context, js nats.JetStreamContext, actor, location string, ...) error
- func PublishDelete(ctx context.Context, js nats.JetStreamContext, actor, location string, ...) error
- func PublishUpdate(ctx context.Context, js nats.JetStreamContext, actor, location string, ...) error
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 ¶
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 ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.