Move cmd module to internal

This commit is contained in:
Alexey Khit
2023-05-01 12:55:14 +03:00
parent bc770f1a85
commit 75f61b38ac
58 changed files with 109 additions and 104 deletions
+22
View File
@@ -0,0 +1,22 @@
package isapi
import (
"github.com/AlexxIT/go2rtc/internal/streams"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/isapi"
)
func Init() {
streams.HandleFunc("isapi", handle)
}
func handle(url string) (core.Producer, error) {
conn, err := isapi.NewClient(url)
if err != nil {
return nil, err
}
if err = conn.Dial(); err != nil {
return nil, err
}
return conn, nil
}