utils

package
v0.0.0-...-9af3b72 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TypeNames = []string{
	"news",
	"tournament",
	"catering",
	"location",
	"player",
}

Functions

This section is empty.

Types

type AMQPQueue

type AMQPQueue interface {
	Publish(CKPTEvent) error
	Consume() (<-chan amqp.Delivery, error)
}

An interface for a message queue

type CKPTEvent

type CKPTEvent struct {
	Type         EventType   `json:"type"`
	RestrictedTo []uuid.UUID `json:"restricted_to"`
	Subject      string      `json:"subject"`
	Message      string      `json:"message"`
}

type EventType

type EventType int
const (
	NEWS_EVENT EventType = iota
	TOURNAMENT_EVENT
	CATERING_EVENT
	LOCATION_EVENT
	PLAYER_EVENT = 4
)

type RMQ

type RMQ struct {
	// contains filtered or unexported fields
}

func NewRMQ

func NewRMQ(url string, queue string) *RMQ

func (*RMQ) Consume

func (rmq *RMQ) Consume() (<-chan amqp.Delivery, error)

func (*RMQ) Publish

func (rmq *RMQ) Publish(event CKPTEvent) error

Jump to

Keyboard shortcuts

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