Documentation ¶
Index ¶
Constants ¶
View Source
const Bitrate int32 = 96000
View Source
const BytesPerRead int32 = Bitrate * 8 / int32(SecondsPerRead)
View Source
const SecondsBeforeAuthRequired = 10
View Source
const SecondsPerRead time.Duration = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the TrackDataService
func (*Server) StreamTrackData ¶
func (server *Server) StreamTrackData(ctx context.Context, userTrackPB *pb.UserTrack) (<-chan pb.TrackChunkOrError, error)
Request a track stream
func (*Server) UploadTrackData ¶
func (server *Server) UploadTrackData(ctx context.Context, trackUpload *pb.TrackUpload) (*pb.TrackServerId, error)
Upload a track stream
type Storage ¶
type Storage interface { GetTrackChunkFromStorage(string, *pb.TrackChunk) (*pb.TrackChunk, error) GetUploadUrl() (*storage.UploadUrl, error) UploadTrackToStorage(*pb.TrackUpload, *storage.UploadUrl) (*storage.StorageFileInfo, error) }
Click to show internal directories.
Click to hide internal directories.