pubsubsql

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2014 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is a container that initializes, binds and controls server components.

func (*Controller) Run

func (this *Controller) Run()

Run is a main server entry function. It processes command line options and runs the server in the appropriate mode.

type IQuitter

type IQuitter interface {
	Done() bool
}

IQuitter is a generic interface called from a participating goroutine to determine if it should quit.

type JSONBuilder

type JSONBuilder struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

type Quitter

type Quitter struct {
	IQuitter
	// contains filtered or unexported fields
}

Quitter implements a quit (shutdown) protocol. When the quit protocol is in progress, all participating goroutines should quit.

func NewQuitter

func NewQuitter() *Quitter

NewQuitter returns a new Quitter.

func (*Quitter) Done

func (this *Quitter) Done() bool

Done returns true if the quit protocol is in progress.

func (*Quitter) GetChan

func (this *Quitter) GetChan() chan int

GetChan returns the channel to be used in a go select statement in order to receive a Quit notification.

func (*Quitter) GoRoutines

func (this *Quitter) GoRoutines() int64

GoRoutines returns the number of participating goroutines in the quit protocol.

func (*Quitter) Join

func (this *Quitter) Join()

Join causes the calling goroutine to participate in the quit protocol.

func (*Quitter) Leave

func (this *Quitter) Leave()

Leave signals that the participating goroutine has quit. Should be called with defer semantics.

func (*Quitter) Quit

func (this *Quitter) Quit(timeout time.Duration) bool

Quit notifies all participating goroutines that the quit protocol is in progress. It waits until all participating goroutines signal that they have quit or until a timeout occurs. Returns false when a timeout has occurred.

func (*Quitter) Wait

func (this *Quitter) Wait(timeout time.Duration) bool

Wait waits until all participating goroutines signal that they have quit or until a timeout occurs. Returns false when a timeout has occurred.

Jump to

Keyboard shortcuts

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