stream

package
v0.0.0-...-20cf3ba Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitWorker

func InitWorker() worker.Worker

Types

type FSM

type FSM struct {
	Clock  func() time.Time
	FSM    *fsm.FSM
	Target chan string
}

type Stream

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

func NewStream

func NewStream(opts ...StreamOption) (*Stream, error)

func (*Stream) GetFSM

func (s *Stream) GetFSM() *fsm.FSM

func (*Stream) LaunchRoku

func (s *Stream) LaunchRoku() error

func (*Stream) NewHttpClient

func (s *Stream) NewHttpClient(ctx context.Context) *http.Client

func (*Stream) OneShot

func (s *Stream) OneShot() chan<- struct{}

func (*Stream) ProcessSegment

func (s *Stream) ProcessSegment(ctx context.Context, request *segment.Request) error

func (*Stream) PushEvent

func (s *Stream) PushEvent(ctx context.Context, str string)

func (*Stream) RokuCB

func (s *Stream) RokuCB() (*roku.Remote, error)

func (*Stream) Run

func (s *Stream) Run(ctx context.Context) error

type StreamOption

type StreamOption func(s *Stream) error

func WithBot

func WithBot(b *bot.Bot) StreamOption

func WithFlags

func WithFlags() StreamOption

func WithRokuCB

func WithRokuCB(rokuCB func() (*roku.Remote, error)) StreamOption

func WithURL

func WithURL(u *url.URL) StreamOption

func WithWorker

func WithWorker(w worker.Worker) StreamOption

Jump to

Keyboard shortcuts

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