Channel
public struct Channel : ChannelDescription
A channel that can be queried for information, or be published to using an Event.
-
The shortened channel name.
This is the channel name without the type identifier prefix, e.g.
"my-channel". It therefore does not expose channel type information, which can be inspected usingtype.Declaration
Swift
public let name: String -
The channel type.
Declaration
Swift
public let type: ChannelType
-
Creates a
Channelbased on a full name (including type prefix).The channel
typeis inferred based on the providedfullName. e.g. AfullNameof"private-my-channel"results in a channel whosenameis"my-channel"and atypeofprivate.If a shortened name is accidentally used, this results in a channel of
typepublicsince no type prefix was provided.Declaration
Swift
public init(fullName: String)Parameters
fullNameThe full channel name.
-
Creates a
Channelbased on a shortened name and a channel type.If a full name is accidentally used, this results in a channel whose type is determined by the
typeparameter, regardless of any type prefix that is present in the name string.Declaration
Swift
public init(name: String, type: ChannelType)Parameters
nameThe shortened channel name.
typeThe channel type.
View on GitHub
Channel Structure Reference