messagebus

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: ISC Imports: 3 Imported by: 0

Documentation

Overview

a queue system to transfer transactions

Index

Constants

This section is empty.

Variables

View Source
var Bus busses

the instance

Functions

This section is empty.

Types

type BroadcastQueue added in v0.6.0

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

a 1:M queue out is synchronous, so messages to routines not waiting are dropped

func (*BroadcastQueue) Chan added in v0.6.0

func (queue *BroadcastQueue) Chan(size int) <-chan Message

get a new channel to read from a 1:M queue each call gets a distinct channel

func (*BroadcastQueue) Send added in v0.6.0

func (queue *BroadcastQueue) Send(command string, parameters ...[]byte)

send a message to a 1:M queue

type Message

type Message struct {
	Command    string   // type of packed data
	Parameters [][]byte // array of parameters
}

message to put into a queue

type Queue added in v0.2.0

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

a 1:1 queue

func (*Queue) Chan added in v0.2.0

func (queue *Queue) Chan() <-chan Message

channel to read from 1:1 queue can only be called once

func (*Queue) Release added in v0.6.1

func (queue *Queue) Release()

give the channel back

func (*Queue) Send added in v0.2.0

func (queue *Queue) Send(command string, parameters ...[]byte)

send a message to a 1:1 queue but only if listener is connected

Jump to

Keyboard shortcuts

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