pubsub

package
v0.0.0-...-cda998f Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatsService

type NatsService struct {
	NatsClient    stan.Conn
	SubjectPrefix string
}

NatsService Implements the pubsub interface with nats

func NewNatsService

func NewNatsService(sc stan.Conn, sp string) *NatsService

NewNatsService instantiates the nats service

func (*NatsService) PublishAdd

func (s *NatsService) PublishAdd(token *jwt.Token) error

PublishAdd publishes that a token has been added to the stream

func (*NatsService) PublishRevoke

func (s *NatsService) PublishRevoke(token *jwt.Token) error

PublishRevoke publishes that a token has been revoked to the stream

type PublisherInterface

type PublisherInterface interface {
	PublishAdd(*jwt.Token) error
	PublishRevoke(*jwt.Token) error
}

PublisherInterface represents a struct with the nats publish methods

Jump to

Keyboard shortcuts

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