Browse Source

Platform

- interface definition
Alexey Kim 10 months ago
parent
commit
edb7c4546d
1 changed files with 19 additions and 0 deletions
  1. 19 0
      platform/platform.go

+ 19 - 0
platform/platform.go

@@ -0,0 +1,19 @@
+package platform
+
+import (
+	"errors"
+	"google.golang.org/protobuf/proto"
+	"net/http"
+)
+
+var (
+	errorClosed = errors.New("broadcasting has been over")
+)
+
+type Platform interface {
+	Id() string
+	Host() string
+	Init(bid string) error
+	Connect(chan proto.Message) error
+	HLSStream() (*http.Request, error)
+}