tiflow icon indicating copy to clipboard operation
tiflow copied to clipboard

What's the different between `tiflow/cdc/api` and `tiflow/pkg/api`?

Open lonng opened this issue 2 years ago • 3 comments

Before asking a question, make sure you have

  • [X] Searched existing Stack Overflow questions
  • [X] Googled your question
  • [X] Searched open and closed GitHub issues
  • [X] Read the documentation

What is your question?

Seems that the two packages are used to implement some parts of TiCDC OpenAPI.

lonng avatar Jun 24 '22 21:06 lonng

@asddongmen Can we merge the two packages?

lonng avatar Jun 24 '22 21:06 lonng

@lonng,tiflow/cdc/api provides the OpenAPI implementation, while tiflow/pkg/api accompanied with a rest client is used to interacting with the OpenAPI. At present, tiflow/pkg/api is mainly used by cli commands. In the future, it can be extracted to another standalone project such as 'tiflow-client-go'. What's your opinion? @asddongmen @sdojjy

zhaoxinyu avatar Jul 01 '22 16:07 zhaoxinyu

@lonng,tiflow/cdc/api provides the OpenAPI implementation, while tiflow/pkg/api accompanied with a rest client is used to interacting with the OpenAPI. At present, tiflow/pkg/api is mainly used by cli commands. In the future, it can be extracted to another standalone project such as 'tiflow-client-go'. What's your opinion? @asddongmen @sdojjy

Yes, I believe that we can merge these two packages in the near future.

asddongmen avatar Jul 05 '22 13:07 asddongmen