pubnub

package
v0.0.0-...-bbb8ac2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubNub

type PubNub struct {
	PubNubPublishKey   string            `required:"true"`
	PubNubSubscribeKey string            `required:"true"`
	PubNubChannels     []string          `required:"true"`
	PubNubNatsMap      map[string]string `required:"true"`
	Config             pubnub.Config
	Listeners          []*pubnub.Listener
	PubNubServer       *pubnub.PubNub
	NatsConn           *nats.Conn
}

PubNub represents the configuration of how the app connects to PubNub and which channels and listeners are associated with it.

func Register

func Register() (*PubNub, error)

Register is the function that creates a new instance of the PubNub agent.

func (*PubNub) Start

func (pn *PubNub) Start() chan bool

Start is the function that takes care of starting the agent and makes sure a file is creating to perform healthchecks in case the agent runs in a Docker container. By returning a boolean channel, it will make sure to create an infinite loop that can be ended grafecully by calling the stop method.

func (*PubNub) Stop

func (pn *PubNub) Stop()

Stop takes care of the actions that need to be performed when gracefully shutting down the agent

Jump to

Keyboard shortcuts

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