MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / serveInterop

Method serveInterop

pkg/component/interop.go:34–46  ·  view source on GitHub ↗
(lis net.Listener)

Source from the content-addressed store, hash-verified

32}
33
34func (c *Component) serveInterop(lis net.Listener) error {
35 srv := http.Server{
36 Handler: c.interop,
37 ReadTimeout: 120 * time.Second,
38 ReadHeaderTimeout: 5 * time.Second,
39 ErrorLog: stdlog.New(io.Discard, "", 0),
40 }
41 go func() {
42 <-c.Context().Done()
43 srv.Close()
44 }()
45 return srv.Serve(lis)
46}
47
48func (c *Component) interopEndpoints() []Endpoint {
49 return []Endpoint{

Callers

nothing calls this directly

Implementers 1

Componentpkg/component/component.go

Calls 5

ContextMethod · 0.95
DoneMethod · 0.80
ServeMethod · 0.80
NewMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected