service

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ChunkSize = 1024 * 1024 * 2.5

ChunkSize is 2.5MB

View Source
const Video2Path = "/streaming_root/internal/infrastructure/static/tmp/video/example_video_2_new.mp4"
View Source
const Video3Path = "/streaming_root/internal/infrastructure/static/tmp/video/example_video_3_new.mp4"
View Source
const VideoPath = "/streaming_root/internal/infrastructure/static/tmp/video/example_video_new.mp4"

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	Start             Action = "start"
	Stop              Action = "stop"
	Next              Action = "next"
	Previous          Action = "prev"
	DecreaseBufferCap Action = "decrBuff"
)

func (Action) String

func (a Action) String() string

type AudioService

type AudioService struct {
}

func NewAudioService

func NewAudioService() *AudioService

type Logger

type Logger interface {
	Info(msg string)
	Debug(msg string)
	Warning(msg string)
	Error(err error)
	Critical(err error)
	Emergency(err error)
}

type Reader

type Reader interface {
	Read(resource entity.Resource) chan *dto.ChunkDto
}

type ReaderService

type ReaderService struct {
	// contains filtered or unexported fields
}

func NewReaderService

func NewReaderService(logger Logger) *ReaderService

func (*ReaderService) Read

func (r *ReaderService) Read(resource entity.Resource) chan *dto.ChunkDto

type Streamer

type Streamer interface {
	Stream(conn *websocket.Conn)
}

type StreamingService

type StreamingService struct {
	// contains filtered or unexported fields
}

func NewStreamingService

func NewStreamingService(
	reader Reader,
	logger Logger,
) *StreamingService

func (*StreamingService) Stream

func (s *StreamingService) Stream(conn *websocket.Conn)

type Video

type Video interface {
	Create(video dto.CreateRequest) (string, error)
}

type VideoService

type VideoService struct {
	// contains filtered or unexported fields
}

func NewVideoService

func NewVideoService(
	ctx context.Context,
	logger Logger,
	builder builder.Video,
	validator validator.Video,
	repository repository.Video,
) *VideoService

func (*VideoService) Create

func (s *VideoService) Create(video dto.CreateRequest) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL