Skip to main content

ChannelSelector

Stentor API Reference


Stentor API Reference / stentor-runtime/src / ChannelSelector

Class: ChannelSelector

Defined in: packages/stentor-runtime/src/ChannelSelector.ts:5

Constructors​

Constructor​

new ChannelSelector(): ChannelSelector

Returns​

ChannelSelector

Methods​

from()​

from(channels, request, lambdaContext?): Channel

Defined in: packages/stentor-runtime/src/ChannelSelector.ts:13

Selects a channel from one of the provided based on the request body and infrastructure context.

Parameters​

channels​

Channel[]

Array of possible channels

request​

object

The request body.

lambdaContext?​

RuntimeContext

Returns​

Channel