subscriber

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: BSD-3-Clause Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGoCloudSubscribers added in v0.0.12

func RegisterGoCloudSubscribers(ctx context.Context) error

func RegisterRedisSubscribers added in v0.0.12

func RegisterRedisSubscribers(ctx context.Context) error

func RegisterSubscriber

func RegisterSubscriber(ctx context.Context, scheme string, f SubscriberInitializeFunc) error

func RegisterTailFileSubscribers added in v0.0.14

func RegisterTailFileSubscribers(ctx context.Context) error

func RegisterTickerSubscribers added in v0.0.12

func RegisterTickerSubscribers(ctx context.Context) error

func SubscriberSchemes added in v0.0.12

func SubscriberSchemes() []string

Types

type ChannelSubscriber

type ChannelSubscriber struct {
	Subscriber
	// contains filtered or unexported fields
}

func (*ChannelSubscriber) Close

func (sub *ChannelSubscriber) Close() error

func (*ChannelSubscriber) Listen

func (sub *ChannelSubscriber) Listen(ctx context.Context, messages_ch chan string) error

type GoCloudSubscriber

type GoCloudSubscriber struct {
	Subscriber
	// contains filtered or unexported fields
}

func (*GoCloudSubscriber) Close

func (sub *GoCloudSubscriber) Close() error

func (*GoCloudSubscriber) Listen

func (sub *GoCloudSubscriber) Listen(ctx context.Context, msg_ch chan string) error

type RedisSubscriber

type RedisSubscriber struct {
	Subscriber
	// contains filtered or unexported fields
}

func (*RedisSubscriber) Close

func (s *RedisSubscriber) Close() error

func (*RedisSubscriber) Listen

func (s *RedisSubscriber) Listen(ctx context.Context, messages_ch chan string) error

type Subscriber

type Subscriber interface {
	Listen(context.Context, chan string) error
	Close() error
}

func NewChannelSubscriberWithChannel

func NewChannelSubscriberWithChannel(ctx context.Context, ch chan string) (Subscriber, error)

func NewGoCloudSubscriber

func NewGoCloudSubscriber(ctx context.Context, uri string) (Subscriber, error)

func NewRedisSubscriber

func NewRedisSubscriber(ctx context.Context, uri string) (Subscriber, error)

func NewSubscriber

func NewSubscriber(ctx context.Context, uri string) (Subscriber, error)

func NewTailFileSubscriber added in v0.0.14

func NewTailFileSubscriber(ctx context.Context, uri string) (Subscriber, error)

func NewTickerSubscriber

func NewTickerSubscriber(ctx context.Context, uri string) (Subscriber, error)

type SubscriberInitializeFunc

type SubscriberInitializeFunc func(ctx context.Context, uri string) (Subscriber, error)

type TailFileSubscriber added in v0.0.14

type TailFileSubscriber struct {
	Subscriber
	// contains filtered or unexported fields
}

func (*TailFileSubscriber) Close added in v0.0.14

func (pub *TailFileSubscriber) Close() error

func (*TailFileSubscriber) Listen added in v0.0.14

func (sub *TailFileSubscriber) Listen(ctx context.Context, messages_ch chan string) error

type TickerSubscriber

type TickerSubscriber struct {
	Subscriber
	// contains filtered or unexported fields
}

func (*TickerSubscriber) Close

func (sub *TickerSubscriber) Close() error

func (*TickerSubscriber) Listen

func (sub *TickerSubscriber) Listen(ctx context.Context, messages_ch chan string) error

Jump to

Keyboard shortcuts

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