loopback

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolVersion        = 9
	ServiceName            = "piik-client"
	ControlSubprotocol     = "piik-client-v9"
	MaxControlMessageBytes = 256 << 10
	DefaultPortStart       = 39721
	DefaultPortEnd         = 39730
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlSession

type ControlSession interface {
	// A nil response with no error is completed later through Events, using the request ID.
	Handle(context.Context, []byte) (any, error)
	Events() <-chan any
	Close() error
}

type Endpoint

type Endpoint struct {
	URL           string `json:"url"`
	Host          string `json:"host"`
	Port          int    `json:"port"`
	InstanceToken string `json:"instanceToken"`
}

type Health

type Health struct {
	Protocol      int                     `json:"protocol"`
	Service       string                  `json:"service"`
	Port          int                     `json:"port"`
	InstanceToken string                  `json:"instanceToken"`
	NativeMedia   NativeMediaCapabilities `json:"nativeMedia"`
}

type NativeMediaCapabilities

type NativeMediaCapabilities struct {
	Video        bool `json:"video"`
	ProcessAudio bool `json:"processAudio"`
	SystemAudio  bool `json:"systemAudio"`
	HardwareH264 bool `json:"hardwareH264"`
	SoftwareVP8  bool `json:"softwareVP8"`
}

type Options

type Options struct {
	PortStart      int
	PortEnd        int
	AllowedOrigins []string
	NativeMedia    NativeMediaCapabilities
	NewControl     func() ControlSession
	Presentation   func(language string)
}

type Server

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

func Start

func Start(parent context.Context, options Options) (*Server, error)

func (*Server) Close

func (server *Server) Close() error

func (*Server) Done

func (server *Server) Done() <-chan error

func (*Server) Endpoint

func (server *Server) Endpoint() Endpoint

func (*Server) ServeHTTP

func (server *Server) ServeHTTP(response http.ResponseWriter, request *http.Request)

func (*Server) SetAllowedOrigins

func (server *Server) SetAllowedOrigins(origins []string)

Jump to

Keyboard shortcuts

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