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

Library cannot be used in other applications. #3

Closed
ecbaldwin opened this issue May 12, 2021 · 2 comments
Closed

Library cannot be used in other applications. #3

ecbaldwin opened this issue May 12, 2021 · 2 comments

Comments

@ecbaldwin
Copy link
Contributor

The README.md file states that this project includes "The library bfdd is based on, which can be reused in other applications." However, that library is marked as internal and cannot be included in other applications.

@thoro
Copy link
Owner

thoro commented May 13, 2021

I'm not sure what you are referring to, the only file marked as internal is "https://github.com/Thoro/bfd/blob/master/internal/app/app.go" which contains the initialization and config loading code for the grpc server / bfdd server.

To use the library you should include the path:

https://github.com/Thoro/bfd/pkg/server

and use the server component like:

        rand.Seed(time.Now().UnixNano())

	s.srv = server.NewBfdServer()

	err := s.srv.Serve()

@ecbaldwin
Copy link
Contributor Author

I ended up copying app.go as a starting point. I realize it may be better suited as an example starting point for an embedded application rather than code to import as-is. Thank you for your quick reply.

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

No branches or pull requests

2 participants