terminate

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFanoutTerminate

func GetFanoutTerminate(
	ctx context.Context,
	fn func(context.Context) ([]context.Context, error),
	fnErr func(context.Context, error) bool,
) (
	chan<- context.Context,
	<-chan context.Context,
)

GetFanoutTerminate returns new input(chan<- ContextContext)/output(<-chan ContextContext) channels that embedded the given 'func(ContextContext) ContextContext'.

func GetPipeTerminate

func GetPipeTerminate(
	ctx context.Context,
	fn func(context.Context) (context.Context, error),
	fnErr func(context.Context, error) bool,
) (
	chan<- context.Context,
	<-chan context.Context,
)

GetPipeTerminate returns new input(chan<- ContextContext)/output(<-chan ContextContext) channels that embedded the given 'func(ContextContext) ContextContext'.

func Terminate

func Terminate(ctx context.Context) (context.Context, error)

Terminate is terminator.

Types

type TerminateGetContexter

type TerminateGetContexter interface {
	GetContext() context.Context
}

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