Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Server] refactor: exporter interface #3932

Merged
merged 2 commits into from Aug 28, 2023

Conversation

jiekun
Copy link
Contributor

@jiekun jiekun commented Aug 21, 2023

This PR is for:

#3926

Trying to provide export interface:

type Exporter interface {
	// Start starts an exporter worker
	Start()

	// Put sends data to the exporter worker. Worker could decide what to do next. e.g.:
	// - send it out synchronously.
	// - store it in a queue and handle it later.
	Put(items ...interface{})

	// IsExportData tell the decoder if data need to be sended to specific exporter.
	IsExportData(items interface{}) bool
}

And a factory init method for all exporters:

func NewExporters(exportersCfg []ExporterCfg, baseCfg *config.Config) []Exporter

@CLAassistant
Copy link

CLAassistant commented Aug 21, 2023

CLA assistant check
All committers have signed the CLA.

@jiekun
Copy link
Contributor Author

jiekun commented Aug 21, 2023

This is a breaking change against previous exporter config. We need an item in CHANGELOG to notify user.
I'm verifying the change and test it on my Kubernetes. This PR is WIP for now.

@jiekun jiekun marked this pull request as draft August 21, 2023 08:44
@jiekun jiekun changed the title refactor: exporter interface [Server] refactor: exporter interface Aug 21, 2023
@jiekun jiekun marked this pull request as ready for review August 21, 2023 11:03
@Nick-0314 Nick-0314 requested a review from lzf575 August 22, 2023 02:03
@Nick-0314
Copy link
Collaborator

@jiekun The server check seems to have failed

@jiekun
Copy link
Contributor Author

jiekun commented Aug 22, 2023

@dundun9 please trigger again

@jiekun
Copy link
Contributor Author

jiekun commented Aug 23, 2023

issue resolved and re-formatted just now.
/ptal @dundun9 @sharang @lzf575

@jiekun
Copy link
Contributor Author

jiekun commented Aug 25, 2023

I'm merging the main branch into feature branch, again. please take a look and drop your comment if possible.
We don't have to waste time running CICD workflow with limited runner resources for those redundant test and check.

@Nick-0314
Copy link
Collaborator

@lzf575 Have time to review it as soon as possible

@lzf575
Copy link
Contributor

lzf575 commented Aug 28, 2023

有些配置是公共的, universalTagsManager 也是公共的, 后续需单独提取出来。

@Nick-0314 Nick-0314 merged commit 7b79b08 into deepflowio:main Aug 28, 2023
6 checks passed
@jiekun jiekun deleted the refactor/exporter-interface branch August 28, 2023 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants