utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataChannel

type DataChannel chan DataEvent

DataChannel is a channel which can accept an DataEvent

type DataChannelSlice

type DataChannelSlice []DataChannel

DataChannelSlice is a slice of DataChannels

type DataEvent

type DataEvent struct {
	Data  interface{}
	Topic string
}

type EventBus

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

EventBus stores the information about subscribers interested for a particular topic

func (*EventBus) Publish

func (eb *EventBus) Publish(topic string, data interface{})

func (*EventBus) PublishToChannel

func (eb *EventBus) PublishToChannel(channel DataChannel, topic string, data interface{})

func (*EventBus) Subscribe

func (eb *EventBus) Subscribe(topic string, ch DataChannel)

type PublishSubscriber added in v1.0.0

type PublishSubscriber interface {
	Publish(topic string, data interface{})
	PublishToChannel(channel DataChannel, topic string, data interface{})
	Subscribe(topic string, ch DataChannel)
}

Directories

Path Synopsis
Logger Interface Use instance of logger instead of exported functions usage example import ( "errors" "github.com/rudderlabs/rudder-server/utils/logger" ) var log logger.LoggerI = &logger.LoggerT{} or var log logger.LoggerI = logger.NewLogger() ...
Logger Interface Use instance of logger instead of exported functions usage example import ( "errors" "github.com/rudderlabs/rudder-server/utils/logger" ) var log logger.LoggerI = &logger.LoggerT{} or var log logger.LoggerI = logger.NewLogger() ...
Zip & Gzip Interfaces Use this instead of archive/zip and compress/gzip packages.
Zip & Gzip Interfaces Use this instead of archive/zip and compress/gzip packages.
GA

Jump to

Keyboard shortcuts

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