strategies

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HTTPEgressStrategyName is the user-friendly name of this strategy
	HTTPEgressStrategyName = "http-egress"

	// HTTPEgressURLToInvokeArgName is the parameter used to supply the URL to fetch from
	HTTPEgressURLToInvokeArgName = "url"

	// HTTPEgressHTTPMethodToUseArgName is the parameter used to supply the HTTP 1.1 method used when fetching the URL
	HTTPEgressHTTPMethodToUseArgName = "method"

	// HTTPEgressHTTPTimeoutArgName is the timeout used to configure the HTTP client when fetching the URL
	HTTPEgressHTTPTimeoutArgName = "http-client-timeout"
)
View Source
const BroadcastChannelStrategyName = "broadcast-channel"

BroadcastChannelStrategyName is the user-friendly name of this strategy

View Source
const PointToPointStrategyName = "point-to-point-channel"

PointToPointStrategyName is the user-friendly name of this strategy

View Source
const TerminusResponseTextArgName = "response-text"

TerminusResponseTextArgName is the parameter used to supply the text to be returned by the TerminusStrategy

View Source
const TerminusStrategyName = "terminus"

TerminusStrategyName Name is the user-friendly name of this strategy

Variables

This section is empty.

Functions

func NewBroadcastChannel

func NewBroadcastChannel(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)

NewBroadcastChannel creates a new BroadcastChannelStrategy

func NewHTTPEgress

func NewHTTPEgress(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)

NewHTTPEgress creates a new HTTPEgressStrategy

func NewPointToPointChannel

func NewPointToPointChannel(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)

NewPointToPointChannel creates a new PointToPointChannelStrategy

func NewTerminusStrategy

func NewTerminusStrategy(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)

NewTerminusStrategy creates a new TerminusStrategy

Types

type BroadcastChannelStrategy

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

BroadcastChannelStrategy is a strategy that will take in a request and broadcast it to all downstream services.

func (*BroadcastChannelStrategy) Do

Do executes the request

type HTTPEgressStrategy

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

HTTPEgressStrategy a strategy that makes a HTTP 1.1 call to a pre-configured URL

func (*HTTPEgressStrategy) Do

Do executes the request

type PointToPointChannelStrategy

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

PointToPointChannelStrategy is a strategy that takes a request and forwards it to a single downstream service.

func (*PointToPointChannelStrategy) Do

type TerminusStrategy

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

TerminusStrategy is a strategy that always returns a pre-configured text message as the response to any requests.

func (*TerminusStrategy) Do

Do executes the request

Jump to

Keyboard shortcuts

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