topiccsm

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

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

T implements a consumer request dispatch tier responsible for a particular topic. It receives requests on the `Requests()` channel and replies with messages received on `Messages()` channel. If there has been no message received for `Config.Consumer.LongPollingTimeout` then a timeout error is sent to the requests' reply channel.

implements `dispatcher.Tier`. implements `multiplexer.Out`.

func New

func New(namespace *actor.ID, group, topic string, cfg *config.T, lifespanCh chan<- *T) *T

Creates a topic consumer instance. It should be explicitly started in accordance with the `dispatcher.Tier` contract.

func (*T) Key

func (tc *T) Key() string

implements `dispatcher.Tier`.

func (*T) Messages

func (tc *T) Messages() chan<- *consumer.Message

implements `multiplexer.Out`

func (*T) Requests

func (tc *T) Requests() chan<- dispatcher.Request

implements `dispatcher.Tier`.

func (*T) Start

func (tc *T) Start(stoppedCh chan<- dispatcher.Tier)

implements `dispatcher.Tier`.

func (*T) Stop

func (tc *T) Stop()

implements `dispatcher.Tier`.

func (*T) String

func (tc *T) String() string

func (*T) Topic

func (tc *T) Topic() string

Topic returns the topic name this topic consumer is responsible for.

Jump to

Keyboard shortcuts

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