master

package
v0.0.0-...-c59394f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQueue

func AddQueue(q *models.Queue) error

AddQueue adds a queue into root queues

func Queues

func Queues(userID int64) ([]models.Queue, error)

Queues returns all queues

Types

type Service

type Service struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Service for a master server

func NewService

func NewService(address string) *Service

NewService allocates a new Service

func (*Service) AddNode

func (s *Service) AddNode(info models.NodeInfo)

AddNode joins a node to the ready-to-serve nodes list

func (*Service) AssignNode

func (s *Service) AssignNode(userID int64, queueName string, squadName string) (string, error)

AssignNode assigns a node to serve one client

func (*Service) Start

func (s *Service) Start()

Start starts the service

Jump to

Keyboard shortcuts

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