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

🚀 v3 Request: Remove Listener, ListenTLS, ListenMutualTLS #1826

Closed
efectn opened this issue Mar 21, 2022 · 2 comments · Fixed by #1930
Closed

🚀 v3 Request: Remove Listener, ListenTLS, ListenMutualTLS #1826

efectn opened this issue Mar 21, 2022 · 2 comments · Fixed by #1930
Assignees
Milestone

Comments

@efectn
Copy link
Member

efectn commented Mar 21, 2022

func (app *App) Listen(addr string, config ...ListenConfig) error

type ListenConfig struct {
	ListenerNetwork string
        CertFile string
        KeyFile string
        ClientCertFile string
	DisableStartupMessage bool
        EnablePrefork bool
	GracefulContext context.Context
	GracefulTimeout time.Duration
	TLSConfigFunc func(tlsConfig *tls.Config)
	ListenerAddrFunc func(addr net.Addr)
}

I think this way is more useful than creating more methods.

Reference: https://github.com/labstack/echo/blob/v5_alpha/server.go

@efectn efectn added this to the v3 milestone Mar 21, 2022
@efectn efectn changed the title 🚀 v3 Request: Remove ListenTLS, ListenMutualTLS 🚀 v3 Request: Remove Listener, ListenTLS, ListenMutualTLS Mar 21, 2022
@efectn efectn added the v3 label Mar 21, 2022
@efectn efectn linked a pull request Jun 4, 2022 that will close this issue
3 tasks
@efectn efectn added this to v3 Jun 5, 2022
@efectn efectn moved this to In Progress in v3 Jun 5, 2022
@efectn efectn removed this from v3 Jun 5, 2022
@efectn efectn added this to v3 Jun 5, 2022
@efectn efectn moved this to In Progress in v3 Jun 5, 2022
@efectn efectn self-assigned this Jun 5, 2022
@kstieger
Copy link

kstieger commented Jun 30, 2022

Hi,
I know this is maybe an additional FRQ, but an option for Listener on a unix socket (/var/run/example.sock) as alternative to the IP/TCP socket would be fine. Or is this already possible?

@efectn
Copy link
Member Author

efectn commented Jun 30, 2022

Hi, I know this is maybe an additional FRQ, but an option for Listener on a unix socket (/var/run/example.sock) as alternative to the IP/TCP socket would be fine. Or is this already possible?

It's possible with net.Listener. you can pass string or listener as addr parameter of Start method. https://github.com/gofiber/fiber/blob/v3-new-start/start.go#L167

@efectn efectn closed this as completed Sep 8, 2022
Repository owner moved this from In Progress to Done in v3 Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants