Documentation
¶
Overview ¶
The consistent hash ring from the original fnlb.
The behaviour of this depends on changes to the runner list leaving it relatively stable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MTLSRunnerFactory ¶
MTLSRunnerFactory represents a factory method for constructing runners using mTLS
type Placer ¶
type Placer interface {
PlaceCall(rp RunnerPool, ctx context.Context, call RunnerCall) error
}
Placer implements a placement strategy for calls that are load-balanced across runners in a pool
func NewCHPlacer ¶
func NewCHPlacer() Placer
func NewNaivePlacer ¶
func NewNaivePlacer() Placer
type Runner ¶
type Runner interface { TryExec(ctx context.Context, call RunnerCall) (bool, error) Close(ctx context.Context) error Address() string }
Runner is the interface to invoke the execution of a function call on a specific runner
type RunnerCall ¶
type RunnerCall interface { LbDeadline() time.Time RequestBody() io.ReadCloser ResponseWriter() http.ResponseWriter StdErr() io.ReadWriteCloser Model() *models.Call }
RunnerCall provides access to the necessary details of request in order for it to be processed by a RunnerPool
type RunnerPool ¶
type RunnerPool interface { Runners(call RunnerCall) ([]Runner, error) Shutdown(ctx context.Context) error }
RunnerPool is the abstraction for getting an ordered list of runners to try for a call
Click to show internal directories.
Click to hide internal directories.