sessinvalidator

package
v0.0.0-...-335cc7e Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopicName   = "login.sessionexpire"
	ChannelName = "expire"
)

Variables

This section is empty.

Functions

func BroadcastSessionExpiry

func BroadcastSessionExpiry(sessId string)

BroadcastSessionExpiry sends a message to NSQ saying that a session is now invalid

func Run

func Run()

Run will connect to NSQ, consume and process session expiry requests We can trigger after initialisation via `server.RegisterPostConnectHandler(sessinvalidator.Run)`

Types

type Processor

type Processor struct{}

Processor exists to strap a HandleMessage to in order to satisfy http://godoc.org/github.com/bitly/go-nsq#Handler

func (*Processor) HandleMessage

func (p *Processor) HandleMessage(msg *nsqlib.Message) error

HandleMessage implements http://godoc.org/github.com/bitly/go-nsq#Handler for processing our jobs

Jump to

Keyboard shortcuts

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