Subscribe and SubscribeTo are similar, but their signatures differ, causing difficulty for users when using or refactoring their codes. Subscribe reads logs from a topic, while SubscribeTo reads logs from a log stream.
|
Subscribe(ctx context.Context, topicID types.TopicID, begin types.GLSN, end types.GLSN, onNextFunc OnNext, opts ...SubscribeOption) (SubscribeCloser, error) |
|
|
|
SubscribeTo(ctx context.Context, topicID types.TopicID, logStreamID types.LogStreamID, begin, end types.LLSN, opts ...SubscribeOption) Subscriber |
We need to redesign the APIs to ensure that they conform to each other. We could consider either push-based or pull-based scan APIs to achieve this. As of now, we do not have any concrete plans, so we are open to any designs.
Subscribe and SubscribeTo are similar, but their signatures differ, causing difficulty for users when using or refactoring their codes. Subscribe reads logs from a topic, while SubscribeTo reads logs from a log stream.
varlog/pkg/varlog/log.go
Lines 33 to 35 in 9e6713b
We need to redesign the APIs to ensure that they conform to each other. We could consider either push-based or pull-based scan APIs to achieve this. As of now, we do not have any concrete plans, so we are open to any designs.