topic

package
v0.0.0-...-e613b9d Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextTicker

func ContextTicker(ctx context.Context, duration time.Duration) (<-chan context.Context, error)

Types

type ChanT

type ChanT generic.Type

ChanT is a placeholder for the genny.

type Ier

type Ier generic.Type

Ier is a placeholder for the genny.

type T

type T generic.Type

T is a placeholder for the genny.

type TWithContext

type TWithContext struct {
	Context context.Context
	T       Ier
}

TWithContext is T with context.Context.

func (*TWithContext) GetContext

func (p *TWithContext) GetContext() context.Context

GetContext returns context.Context.

func (*TWithContext) GetT

func (p *TWithContext) GetT() Ier

GetT returns Ier.

func (*TWithContext) MarshalZerologObject

func (p *TWithContext) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject writes TWithContext to given zerolog.Event.

func (*TWithContext) String

func (p *TWithContext) String() string

String returns TWithContext as string.

func (*TWithContext) Validate

func (p *TWithContext) Validate() error

Validate returns error if failed validate.

type TopicChanT

type TopicChanT interface {
	// Publish returns a '<-chan ChanT' that joins to the given topic.
	Publish(ctx context.Context, c <-chan ChanT)
	// Publisher returns a 'chan<- ChanT' that joins to the given topic.
	Publisher(ctx context.Context) chan<- ChanT
	// Subscribe returns a 'chan<- ChanT' that joins to the given topic.
	Subscribe(c chan<- ChanT)
}

TopicChanT is a topic.

func GetTopicChanT

func GetTopicChanT(topic interface{}) TopicChanT

GetTopicChanT returns a TopicChanT of the given topic.

type TopicContextContext

type TopicContextContext interface {
	// Publish returns a '<-chan ContextContext' that joins to the given topic.
	Publish(ctx context.Context, c <-chan context.Context)
	// Publisher returns a 'chan<- ContextContext' that joins to the given topic.
	Publisher(ctx context.Context) chan<- context.Context
	// Subscribe returns a 'chan<- ContextContext' that joins to the given topic.
	Subscribe(c chan<- context.Context)
}

TopicContextContext is a topic.

func GetTopicContextContext

func GetTopicContextContext(topic interface{}) TopicContextContext

GetTopicContextContext returns a TopicContextContext of the given topic.

Jump to

Keyboard shortcuts

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