combo

package
v0.3.28 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package combo provides different Publisher implementations that delegate the work to real implementations, such as calling another publisher if one fails.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFallbackPublisher

func NewFallbackPublisher(publishers ...publisher.Publisher) publisher.Publisher

NewFallbackPublisher returns a publisher.Publisher that will try multiple other Publishers in order until one succeeds.

The Publishers are tried in the order specified in the call to NewFallbackPublisher. If and only if all the Publishers return an error result, the fallback publisher will also return an error result. Otherwise, it will return the result of the first Publisher to succeed and will swallow any errors. Subsequent Publishers will not be attempted after one succeeds.

func NewFanoutPublisher

func NewFanoutPublisher(publishers ...publisher.Publisher) publisher.Publisher

func NewPiggybackedPublisher

func NewPiggybackedPublisher(primary, carried publisher.Publisher) publisher.Publisher

NewPiggybackedPublisher will return a new publisher.Publisher that will call `primary` before then calling `carried`. An error will be returned if the `carried` publisher fails, otherwise the returned objects will come from the `primary` publisher.

func NewPrioritizedFanoutPublisher

func NewPrioritizedFanoutPublisher(timeout time.Duration, publishers ...publisher.Publisher) publisher.Publisher

Types

This section is empty.

Jump to

Keyboard shortcuts

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