package router
The io.buoyant.router and com.twitter.finagle.buoyant packages provide a library for building RPC routers with Finagle.
- Alphabetic
- By Inheritance
- router
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- class PerDstPathFilter [Req, Rsp] extends SimpleFilter[Req, Rsp]
- case class RetryBudgetConfig (ttlSecs: Option[Int] = None, minRetriesPerSec: Option[Int] = None, percentCanRetry: Option[Double] = None) extends Product with Serializable
-
trait
Router
[Req, Rsp] extends AnyRef
A
Routeris a lot like acom.twitter.finagle.Client, except that it is not configured with destinationcom.twitter.finagle.Name.A
Routeris a lot like acom.twitter.finagle.Client, except that it is not configured with destinationcom.twitter.finagle.Name. Instead, a destination is determined for each request by an Identifier and a client is then dynamically resolved.Routers are implemented by the various protocol packages. For example:
object Http extends Router[Request, Response] ... val router: ServiceFactory[Request, Response] = Http.newRouter("http")
-
class
RoutingFactory
[Req, Rsp] extends ServiceFactory[Req, Rsp]
A RoutingFactory is a ServiceFactory that, for each request, determines a routable name for the request, resolves it to a client, and dispatches the request to a downstream service.
A RoutingFactory is a ServiceFactory that, for each request, determines a routable name for the request, resolves it to a client, and dispatches the request to a downstream service.
getDstis responsible for determining the name (Path) of each request.A DstBindingFactory is used to obtain a client that serves each destination.
-
trait
StackRouter
[Req, Rsp] extends Router[Req, Rsp] with Parameterized[StackRouter[Req, Rsp]]
A Router that composes three
com.twitter.finagle.Stacks:A Router that composes three
com.twitter.finagle.Stacks:*
pathStackis a per-Dst.Path Stack segment. When this Stack is applied, the Dst.PathStack.Paramis configured. This type of destination has a destinationcom.twitter.finagle.Path, a basecom.twitter.finagle.Dtab, and a local (usually per-request)Dtab.*
boundStackis a per-com.twitter.finagle.buoyant.Dst.BoundStack segment. When this Stack is applied, the Dst.Bound Stack.Param is configured. This type of destination has ancom.twitter.finagle.Addr, a bound id, and a residual path.*
clientStackis a per-com.twitter.finagle.BindingFactory.DestStack segment. When this Stack is applied, theBindingFactory.DestStack.Paramis configured with acom.twitter.finagle.Name.Boundthat does not have a residualcom.twitter.finagle.Path.The stack is divided into these layers so that caching may be applied bottom-up. This enables a
clientStackto be shared by multipleboundStackand aboundStackto be shared by multiplepathStacks. It is theStackRouter's job to connect theseStacksegments and to set the propercom.twitter.finagle.Stack.Params as described above. -
trait
StdStackRouter
[Req, Rsp, This <: StdStackRouter[Req, Rsp, This]] extends StackRouter[Req, Rsp]
The standard template implementation of StackRouter.
The standard template implementation of StackRouter.
Provides Stack caching so that e.g. multiple per-path stacks may share common underlying
boundStackandclientStackservice factories.Implementers must provide a
newIdentifier()implementation that l
Value Members
- object ClassifiedRetries
- object ClassifiedTracing
- object LocalClassifierStatsFilter
-
object
Originator
Originator.Param is a boolean stack param that is used to configure a Router.
Originator.Param is a boolean stack param that is used to configure a Router. If the param is set to true, it indicates that the router is the first hop in a linker-to-linker request, and the router's stats are updated to reflect that.
- See also
com.twitter.finagle.Stack.Param
- object PathRegistry extends StackRegistry
- object PerDstPathStatsFilter
- object RetryBudgetModule
-
object
RouterLabel
RouterLabel.Param is a string stack param containing the router's label.
RouterLabel.Param is a string stack param containing the router's label.
- See also
com.twitter.finagle.Stack.Param
- object RoutingFactory
- object StackRouter