Open sssion opened 2 years ago
engine_test.go 139 subject, err := New( WithHost(pubHost), WithPublisherKind(DataTransferPublisher), WithTopic(pubT), WithTopicName(topic), WithSubTopic(pubTSub), WithExtraGossipData(extraGossipData), ) If delete WithTopicName or modify the topic string, the ut will fail.
// WithTopic sets the pubsub topic on which new advertisements are announced. // To use the default pubsub configuration with a specific topic name, use WithTopicName. If both // options are specified, WithTopic takes presence. // // Note that this option only takes effect if the PublisherKind is set to DataTransferPublisher. // See: WithPublisherKind. func WithTopic(t pubsub.Topic) Option { return func(o options) error { o.pubTopic = t return nil } }
// WithTopicName sets toe topic name on which pubsub announcements are published. // To override the default pubsub configuration, use WithTopic. // // Note that this option only takes effect if the PublisherKind is set to DataTransferPublisher. // See: WithPublisherKind. func WithTopicName(t string) Option { return func(o *options) error { o.pubTopicName = t return nil } }