Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatTopic ¶
Types ¶
type PublishConfig ¶
func (*PublishConfig) Apply ¶
func (c *PublishConfig) Apply(pc *PublishConfig)
type PublishOption ¶
type PublishOption interface {
Apply(*PublishConfig)
}
func WithPublishApp ¶
func WithPublishApp(value string) PublishOption
WithPublishApp modifies publish config app identifier.
func WithPublishNamespace ¶
func WithPublishNamespace(value string) PublishOption
WithPublishNamespace modifies publish config namespace.
type PublishOptionFunc ¶
type PublishOptionFunc func(*PublishConfig)
PublishOptionFunc is a function that configures a publish config.
func (PublishOptionFunc) Apply ¶
func (f PublishOptionFunc) Apply(config *PublishConfig)
Apply calls f(publishConfig).
type SubscribeConfig ¶
type SubscribeOption ¶
type SubscribeOption interface {
Apply(*SubscribeConfig)
}
SubscribeOption configures a subscription config.
func WithChannelHealthCheckInterval ¶
func WithChannelHealthCheckInterval(value time.Duration) SubscribeOption
WithChannelHealthCheckInterval specifies the channel health check interval. PubSub will ping Server if it does not receive any messages within the interval. To disable health check, use zero interval.
func WithChannelNamespace ¶
func WithChannelNamespace(value string) SubscribeOption
WithNamespace returns an channel option that configures namespace.
func WithChannelSendTimeout ¶
func WithChannelSendTimeout(value time.Duration) SubscribeOption
WithChannelSendTimeout specifies the channel send timeout after which the message is dropped.
func WithChannelSize ¶
func WithChannelSize(value int) SubscribeOption
WithChannelSize specifies the Go chan size that is used to buffer incoming messages for subscriber.
func WithTopics ¶
func WithTopics(topics ...string) SubscribeOption
WithTopics specifies the topics to subsribe.
type SubscribeOptionFunc ¶
type SubscribeOptionFunc func(*SubscribeConfig)
SubscribeOptionFunc is a function that configures a subscription config.
func (SubscribeOptionFunc) Apply ¶
func (f SubscribeOptionFunc) Apply(config *SubscribeConfig)
Apply calls f(subscribeConfig).