tracker

package
v0.0.0-...-e275940 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tracker creates a websocket server and sends total amount of connections to a messenger module

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(t TrackerServer, quit ChanQuit)

Types

type ChanChanges

type ChanChanges chan int

type ChanQuit

type ChanQuit chan os.Signal

type Messenger

type Messenger interface {
	SendValue(value int)
}

type TrackerContext

type TrackerContext struct {
	echo.Context
	ChanChanges
}

Custom context for Echo

func (*TrackerContext) Track

func (tc *TrackerContext) Track(c echo.Context)

type TrackerServer

type TrackerServer struct {
	Port      string
	Messenger Messenger
}

Jump to

Keyboard shortcuts

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