Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel string
Channel represents a websocket stream channel
const ( // ErrorChannel handles all the errors that happens inside the server. ErrorChannel Channel = "error" )
func RegisterPrivateChannel ¶
RegisterPrivateChannel registers a new private channel. It converts the input string to the Channel type and adds it to the supportedChannels a supportedPrivateChannels maps.
RegisterPrivateChannel is thread safe and client can use it in multiple goroutines.
Client should call this function in application startup to register the private channels.
func RegisterPrivateChannels ¶
RegisterPrivateChannels registers a list of private channels. It is thread safe.
func RegisterPublicChannel ¶
RegisterPublicChannel registers a new public channel. It converts the input string to the Channel type and adds it to the supportedChannels a supportedPublicChannels maps.
RegisterPublicChannel is thread safe and client can use it in multiple goroutines.
Client should call this function in application startup to register the public channels.
func RegisterPublicChannels ¶
RegisterPublicChannels registers a list of public channels. It is thread safe.
func (Channel) IsSupportedChannel ¶
IsSupportedChannel checks if the channel value is valid or not. It is trade-safe.
func (Channel) IsSupportedPrivateChannel ¶
IsSupportedPrivateChannel checks if the channel value is a valid private channel or not. It is trade-safe.
func (Channel) IsSupportedPublicChannel ¶
IsSupportedPublicChannel checks if the channel value is a valid public channel or not. It is trade-safe.