core

package module
v1.0.2 Latest Latest
Warning

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

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

README

流媒体操作库

协议

拉流客户端

推流客户端

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignalWait

func SignalWait()

Types

type AbstractSubject

type AbstractSubject[T any] struct {
	// contains filtered or unexported fields
}

AbstractSubject 实现了观察者主题功能,使用时继承使用

func (*AbstractSubject[T]) AttachObserver

func (s *AbstractSubject[T]) AttachObserver(ob Observer[T], data any)

func (*AbstractSubject[T]) DetachObserver

func (s *AbstractSubject[T]) DetachObserver(ob Observer[T])

func (*AbstractSubject[T]) Notify

func (s *AbstractSubject[T]) Notify(data T)

type Observer

type Observer[T any] interface {
	OnData(data T, args any)
}

Observer 观察者

type Subject

type Subject[T any] interface {
	AttachObserver(ob Observer[T], data any)
	DetachObserver(ob Observer[T])
	Notify(data T)
}

Subject 抽象主题

Directories

Path Synopsis
tcp

Jump to

Keyboard shortcuts

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