Bases: BaseModel
A class to represent channel binding.
ATTRIBUTE |
DESCRIPTION |
channel |
|
method |
the method used for binding (ssubscribe, psubscribe, subscribe)
|
bindingVersion |
the version of the binding
|
channel
instance-attribute
method
class-attribute
instance-attribute
groupName
class-attribute
instance-attribute
consumerName
class-attribute
instance-attribute
bindingVersion
class-attribute
instance-attribute
bindingVersion = 'custom'
from_sub
classmethod
Source code in faststream/specification/asyncapi/v2_6_0/schema/bindings/redis/channel.py
| @classmethod
def from_sub(cls, binding: redis.ChannelBinding | None) -> Self | None:
if binding is None:
return None
return cls(
channel=binding.channel,
method=binding.method,
groupName=binding.group_name,
consumerName=binding.consumer_name,
)
|
from_pub
classmethod
Source code in faststream/specification/asyncapi/v2_6_0/schema/bindings/redis/channel.py
| @classmethod
def from_pub(cls, binding: redis.ChannelBinding | None) -> Self | None:
if binding is None:
return None
return cls(
channel=binding.channel,
method=binding.method,
groupName=binding.group_name,
consumerName=binding.consumer_name,
)
|