Documentation ¶
Index ¶
- Constants
- func NewBroadcastChannel(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)
- func NewHTTPEgress(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)
- func NewPointToPointChannel(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)
- func NewTerminusStrategy(config *service.Config, servers []service.Server, clients []service.Client) (service.Strategy, error)
- type BroadcastChannelStrategy
- type HTTPEgressStrategy
- type PointToPointChannelStrategy
- type TerminusStrategy
Constants ¶
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" )
const BroadcastChannelStrategyName = "broadcast-channel"
BroadcastChannelStrategyName is the user-friendly name of this strategy
const PointToPointStrategyName = "point-to-point-channel"
PointToPointStrategyName is the user-friendly name of this strategy
const TerminusResponseTextArgName = "response-text"
TerminusResponseTextArgName is the parameter used to supply the text to be returned by the TerminusStrategy
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
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 ¶
func (s *BroadcastChannelStrategy) Do(_ context.Context, req *pb.TheRequest) (*pb.TheResponse, error)
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 ¶
func (s *HTTPEgressStrategy) Do(_ context.Context, req *pb.TheRequest) (*pb.TheResponse, error)
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 ¶
func (s *PointToPointChannelStrategy) Do(_ context.Context, req *pb.TheRequest) (*pb.TheResponse, error)
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 ¶
func (s *TerminusStrategy) Do(_ context.Context, req *pb.TheRequest) (*pb.TheResponse, error)
Do executes the request