local

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 8 Imported by: 0

README

Local Listener

A local listener implementation that uses Go channels for communication. Use this for messaging in the context of a single process.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInProvider = errors.New("a local listener must be created with the ListenerProvider.New method")
View Source
var ErrNotNotificationType = errors.New("a notification must be of type listener.Notification")

Functions

This section is empty.

Types

type Listener

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

func (*Listener) IP

func (l *Listener) IP() string

func (*Listener) Listen

func (l *Listener) Listen() (chan listener.Notification, chan error, error)

func (*Listener) Stop

func (l *Listener) Stop()

type ListenerFactory

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

func NewListenerFactory

func NewListenerFactory(llf *ListenerProvider) *ListenerFactory

func (*ListenerFactory) New

func (l *ListenerFactory) New(channelName string, matcher listener.TypeMatcher) listener.Listener

func (*ListenerFactory) Shutdown

func (l *ListenerFactory) Shutdown()

type ListenerProvider

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

func NewListenerProvider

func NewListenerProvider(args ListenerProviderArgs) *ListenerProvider

func (*ListenerProvider) New

func (l *ListenerProvider) New(name string) *Listener

Only intended to be called from listenerfactory.go's `New` method.

func (*ListenerProvider) Notify

func (l *ListenerProvider) Notify(channel string, n interface{})

Only intended to be called from the store conn_base.go's `Notify` method. Please use the store method and don't call this directly.

type ListenerProviderArgs

type ListenerProviderArgs struct {
}

Jump to

Keyboard shortcuts

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