Movatterモバイル変換


[0]ホーム

URL:


Notice  The highest tagged major version isv4.

pubsub

package
v1.4.0Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License:Apache-2.0Imports:4Imported by:0

Details

Repository

github.com/autom8ter/machine

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeFilteradded inv1.3.0

type Filter func(msg interface{})bool

Filter is a function to filter out messages before they reach a subscriptions primary Handler

typeHandleradded inv1.3.0

type Handler func(msg interface{})bool

Handler is the function executed against the inbound message in a subscription

typePubSub

type PubSub interface {// Publish publishes the object to the channel by namePublish(channelstring, obj interface{})error// Subscribe subscribes to the given channel until the context is cancelled.Subscribe(ctxcontext.Context, channelstring, handlerHandler, opts ...SubOpt)error// Close closes all subscriptionsClose()}

PubSub is used to asynchronously pass messages between routines.

funcNewPubSub

func NewPubSub()PubSub

typeSubOptadded inv1.4.0

type SubOpt func(options *SubOptions)

funcWithFilteradded inv1.4.0

func WithFilter(filterFilter)SubOpt

typeSubOptionsadded inv1.4.0

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

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp