capture

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EventTTLSeconds = 3600

Variables

This section is empty.

Functions

func PopRawEvent

func PopRawEvent(ctx context.Context, redis *redis.Client, connCode string, timeout time.Duration) (string, error)

func PushEvent

func PushEvent(ctx context.Context, redis *redis.Client, connCode string, jobType EventType, payload string) error

Types

type Event

type Event struct {
	EventType EventType `json:"type"`
	Payload   []byte    `json:"payload"`
}

type EventType

type EventType int
const (
	Connection EventType = iota
	Lobby
	State
	Player
	GameOver
)

Jump to

Keyboard shortcuts

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