diff --git a/compress/api_restreamer.go b/compress/api_restreamer.go index 29f3876..3566fe4 100644 --- a/compress/api_restreamer.go +++ b/compress/api_restreamer.go @@ -121,4 +121,14 @@ func (o *compress) CreateEventsBulk(request []InstancesEventCreate) (*ResponseSe } o.debugPrint(obj) return &obj, nil +} + +func (o *compress) RestreamerHlsStart(request hlsBodyRequest) (*HlsResponse, error){ + return nil, nil +} + + + +func (o *compress) RestreamerHlsStop(request hlsBodyRequest) (*HlsResponse, error){ + return nil, nil } \ No newline at end of file diff --git a/compress/compress.go b/compress/compress.go index 8926268..fb5b188 100644 --- a/compress/compress.go +++ b/compress/compress.go @@ -25,6 +25,8 @@ type ICompress interface { GetSingleRestreamer(instanceName string) (*Restreamer, error) ScaleRestreamer(instanceName string, scale int) (*ResponseServer, error) CreateEventsBulk(request []InstancesEventCreate) (*ResponseServer, error) + RestreamerHlsStart(request hlsBodyRequest) (*HlsResponse, error) + RestreamerHlsStop(request hlsBodyRequest) (*HlsResponse, error) // } @@ -64,6 +66,7 @@ func NewCompress(customerName, apiKey string, isDebug bool) (ICompress, error) { if err != nil { return nil, err } + // @p4xx07 need to refactor with multizone c.minioClient, err = getMinioClient( u.Host, cred.S3AccessKey, diff --git a/compress/model_restreamer.go b/compress/model_restreamer.go index fcb0636..b49dc58 100644 --- a/compress/model_restreamer.go +++ b/compress/model_restreamer.go @@ -105,4 +105,54 @@ type InstancesEventCreate struct { type bulkRestreamerRequest struct { BaseModel Instances []InstancesEventCreate -} \ No newline at end of file +} + + +type HlsResponse struct { + Message string `json:"message" ` + Result string `json:"result" ` +} + +type hlsBodyRequest struct { + BaseModel + InstanceName string `json:"instance_name" ` + StreamProtocol string `json:"stream_protocol" ` +} + + +type startPushRequest struct { + BaseModel + InstanceName string `json:"instance_name" validate:"min=0" required:"true"` + ExternalServers []struct { + ExternalServer string `json:"external_server" ` + IngestProtocol string `json:"ingest_protocol" ` + AudioChannel string `json:"audio_channel" ` + } `json:"external_servers"` +} + + +type stopPushRequest struct { + BaseModel + InstanceName string `json:"instance_name" ` + ExternalServers []struct { + ProcessID string `json:"process_id" ` + } `json:"external_servers"` +} + + +type startPullRequest struct { + BaseModel + InstanceName string `json:"instance_name" ` + ExternalServer string `json:"external_server" ` + IngestProtocol string `json:"ingest_protocol" ` + AudioChannel string `json:"audio_channel" ` + Type string `json:"type" ` + Encoding string `json:"encoding" ` +} + + +type stopPullRequest struct { + BaseModel + InstanceName string `json:"instance_name" ` + ProcessID string `json:"process_id" ` +}