controllers

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_N_LOC_THREADS = 4
	MAX_N_THREADS     = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Publisher  *ControllerPublisher
	Channel    chan *models.Data
	ChannelLoc chan *models.Data
	Quit       chan int
}

func New

func New(subscribers []ControllerObserver) *Controller

func (*Controller) Exit

func (controller *Controller) Exit()

func (*Controller) Sorter

func (controller *Controller) Sorter() func(*gin.Context)

type ControllerObserver

type ControllerObserver interface {
	Run(data *models.Data)
}

type ControllerPublisher

type ControllerPublisher struct {
	Subscribers []ControllerObserver
	PuMutex     sync.Mutex
}

func NewControllerPublisher

func NewControllerPublisher(subscribers []ControllerObserver) *ControllerPublisher

func (*ControllerPublisher) Notify

func (publisher *ControllerPublisher) Notify(data *models.Data)

func (*ControllerPublisher) Subscribe

func (publisher *ControllerPublisher) Subscribe(subscriber ControllerObserver)

type Sor

type Sor struct {
	Body        io.Reader
	ContentType string
	Cont        *Controller
}

Jump to

Keyboard shortcuts

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