Documentation ¶
Index ¶
- Variables
- type CallWrapperFunc
- type Client
- func (c *Client) AddIncomingStream(ctx context.Context, streamID api.StreamID) error
- func (c *Client) AddStreamDestination(ctx context.Context, destinationID api.DestinationID, url string, ...) error
- func (c *Client) AddStreamForward(ctx context.Context, streamID api.StreamID, destinationID api.DestinationID, ...) error
- func (c *Client) AddStreamPlayer(ctx context.Context, streamID streamtypes.StreamID, playerType player.Backend, ...) error
- func (c *Client) AddTimer(ctx context.Context, triggerAt time.Time, action api.Action) (api.TimerID, error)
- func (c *Client) AddTriggerRule(ctx context.Context, triggerRule *api.TriggerRule) (api.TriggerRuleID, error)
- func (c *Client) ApplyProfile(ctx context.Context, platID streamcontrol.PlatformName, ...) error
- func (c *Client) BanUser(ctx context.Context, platID streamcontrol.PlatformName, ...) error
- func (c *Client) DialContext(ctx context.Context, network string, addr string) (net.Conn, error)
- func (c *Client) EXPERIMENTAL_ReinitStreamControllers(ctx context.Context) error
- func (c *Client) EndStream(ctx context.Context, platID streamcontrol.PlatformName) error
- func (c *Client) GetBackendInfo(ctx context.Context, platID streamcontrol.PlatformName) (*api.BackendInfo, error)
- func (c *Client) GetConfig(ctx context.Context) (*streamdconfig.Config, error)
- func (c *Client) GetLoggingLevel(ctx context.Context) (logger.Level, error)
- func (c *Client) GetStreamPlayer(ctx context.Context, streamID streamtypes.StreamID) (*api.StreamPlayer, error)
- func (c *Client) GetStreamStatus(ctx context.Context, platID streamcontrol.PlatformName) (*streamcontrol.StreamStatus, error)
- func (c *Client) GetVariable(ctx context.Context, key consts.VarKey) ([]byte, error)
- func (c *Client) GetVariableHash(ctx context.Context, key consts.VarKey, hashType crypto.Hash) ([]byte, error)
- func (c *Client) HandleConn(context.Context, stats.ConnStats)
- func (c *Client) HandleRPC(ctx context.Context, s stats.RPCStats)
- func (c *Client) InitCache(ctx context.Context) error
- func (c *Client) IsBackendEnabled(ctx context.Context, id streamcontrol.PlatformName) (bool, error)
- func (c *Client) ListIncomingStreams(ctx context.Context) ([]api.IncomingStream, error)
- func (c *Client) ListStreamDestinations(ctx context.Context) ([]api.StreamDestination, error)
- func (c *Client) ListStreamForwards(ctx context.Context) ([]api.StreamForward, error)
- func (c *Client) ListStreamPlayers(ctx context.Context) ([]api.StreamPlayer, error)
- func (c *Client) ListStreamServers(ctx context.Context) ([]api.StreamServer, error)
- func (c *Client) ListTimers(ctx context.Context) ([]api.Timer, error)
- func (c *Client) ListTriggerRules(ctx context.Context) (api.TriggerRules, error)
- func (c *Client) OBS(ctx context.Context) (obs_grpc.OBSServer, context.CancelFunc, error)
- func (c *Client) Ping(ctx context.Context, ...) error
- func (c *Client) RemoveChatMessage(ctx context.Context, platID streamcontrol.PlatformName, ...) error
- func (c *Client) RemoveIncomingStream(ctx context.Context, streamID api.StreamID) error
- func (c *Client) RemoveStreamDestination(ctx context.Context, destinationID api.DestinationID) error
- func (c *Client) RemoveStreamForward(ctx context.Context, streamID api.StreamID, destinationID api.DestinationID) error
- func (c *Client) RemoveStreamPlayer(ctx context.Context, streamID streamtypes.StreamID) error
- func (c *Client) RemoveTimer(ctx context.Context, timerID api.TimerID) error
- func (c *Client) RemoveTriggerRule(ctx context.Context, ruleID api.TriggerRuleID) error
- func (c *Client) ResetCache(ctx context.Context) error
- func (c *Client) Restart(ctx context.Context) error
- func (c *Client) Run(ctx context.Context) error
- func (c *Client) SaveConfig(ctx context.Context) error
- func (c *Client) SendChatMessage(ctx context.Context, platID streamcontrol.PlatformName, message string) error
- func (c *Client) SetConfig(ctx context.Context, cfg *streamdconfig.Config) error
- func (c *Client) SetDescription(ctx context.Context, platID streamcontrol.PlatformName, description string) error
- func (c *Client) SetLoggingLevel(ctx context.Context, level logger.Level) error
- func (c *Client) SetTitle(ctx context.Context, platID streamcontrol.PlatformName, title string) error
- func (c *Client) SetVariable(ctx context.Context, key consts.VarKey, value []byte) error
- func (c *Client) StartStream(ctx context.Context, platID streamcontrol.PlatformName, title string, ...) error
- func (c *Client) StartStreamServer(ctx context.Context, serverType api.StreamServerType, listenAddr string, ...) error
- func (c *Client) StopStreamServer(ctx context.Context, listenAddr string) error
- func (c *Client) StreamPlayerClose(ctx context.Context, streamID streamtypes.StreamID) error
- func (c *Client) StreamPlayerEndChan(ctx context.Context, streamID streamtypes.StreamID) (<-chan struct{}, error)
- func (c *Client) StreamPlayerGetLength(ctx context.Context, streamID streamtypes.StreamID) (time.Duration, error)
- func (c *Client) StreamPlayerGetLink(ctx context.Context, streamID streamtypes.StreamID) (string, error)
- func (c *Client) StreamPlayerGetPosition(ctx context.Context, streamID streamtypes.StreamID) (time.Duration, error)
- func (c *Client) StreamPlayerIsEnded(ctx context.Context, streamID streamtypes.StreamID) (bool, error)
- func (c *Client) StreamPlayerOpenURL(ctx context.Context, streamID streamtypes.StreamID, link string) error
- func (c *Client) StreamPlayerProcessTitle(ctx context.Context, streamID streamtypes.StreamID) (string, error)
- func (c *Client) StreamPlayerSetPause(ctx context.Context, streamID streamtypes.StreamID, pause bool) error
- func (c *Client) StreamPlayerSetSpeed(ctx context.Context, streamID streamtypes.StreamID, speed float64) error
- func (c *Client) StreamPlayerStop(ctx context.Context, streamID streamtypes.StreamID) error
- func (c *Client) SubmitEvent(ctx context.Context, event event.Event) error
- func (c *Client) SubmitOAuthCode(ctx context.Context, req *streamd_grpc.SubmitOAuthCodeRequest) (*streamd_grpc.SubmitOAuthCodeReply, error)
- func (c *Client) SubscribeToChatMessages(ctx context.Context) (<-chan api.ChatMessage, error)
- func (c *Client) SubscribeToConfigChanges(ctx context.Context) (<-chan api.DiffConfig, error)
- func (c *Client) SubscribeToIncomingStreamsChanges(ctx context.Context) (<-chan api.DiffIncomingStreams, error)
- func (c *Client) SubscribeToOAuthURLs(ctx context.Context, listenPort uint16) (<-chan *streamd_grpc.OAuthRequest, error)
- func (c *Client) SubscribeToStreamDestinationsChanges(ctx context.Context) (<-chan api.DiffStreamDestinations, error)
- func (c *Client) SubscribeToStreamForwardsChanges(ctx context.Context) (<-chan api.DiffStreamForwards, error)
- func (c *Client) SubscribeToStreamPlayersChanges(ctx context.Context) (<-chan api.DiffStreamPlayers, error)
- func (c *Client) SubscribeToStreamServersChanges(ctx context.Context) (<-chan api.DiffStreamServers, error)
- func (c *Client) SubscribeToStreamsChanges(ctx context.Context) (<-chan api.DiffStreams, error)
- func (c *Client) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
- func (c *Client) TagRPC(ctx context.Context, _ *stats.RPCTagInfo) context.Context
- func (c *Client) UpdateStream(ctx context.Context, platID streamcontrol.PlatformName, title string, ...) error
- func (c *Client) UpdateStreamDestination(ctx context.Context, destinationID api.DestinationID, url string, ...) error
- func (c *Client) UpdateStreamForward(ctx context.Context, streamID api.StreamID, destinationID api.DestinationID, ...) error
- func (c *Client) UpdateStreamPlayer(ctx context.Context, streamID streamtypes.StreamID, playerType player.Backend, ...) (_err error)
- func (c *Client) UpdateTriggerRule(ctx context.Context, ruleID api.TriggerRuleID, triggerRule *api.TriggerRule) error
- func (c *Client) WaitForStreamPublisher(ctx context.Context, streamID api.StreamID) (<-chan struct{}, error)
- type Config
- type ConnectWrapperFunc
- type OBSInstanceID
- type Option
- type OptionCallWrapper
- type OptionConnectWrapper
- type OptionReconnectInitialInterval
- type OptionReconnectIntervalMultiplier
- type OptionReconnectMaximalInterval
- type OptionUsePersistentConnection
- type Options
- type ReconnectConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = func(ctx context.Context) Config { return Config{ UsePersistentConnection: true, Reconnect: ReconnectConfig{ InitialInterval: 200 * time.Millisecond, MaximalInterval: 5 * time.Second, IntervalMultiplier: 1.1, }, } }
Functions ¶
This section is empty.
Types ¶
type CallWrapperFunc ¶
type Client ¶
type Client struct { Stats struct { BytesIn uint64 BytesOut uint64 } Target string Config Config PersistentConnectionLocker xsync.Mutex PersistentConnection *grpc.ClientConn PersistentStreamDClient streamd_grpc.StreamDClient PersistentOBSClient obs_grpc.OBSClient }
func (*Client) AddIncomingStream ¶
func (*Client) AddStreamDestination ¶
func (*Client) AddStreamForward ¶
func (*Client) AddStreamPlayer ¶
func (*Client) AddTriggerRule ¶
func (c *Client) AddTriggerRule( ctx context.Context, triggerRule *api.TriggerRule, ) (api.TriggerRuleID, error)
func (*Client) ApplyProfile ¶
func (c *Client) ApplyProfile( ctx context.Context, platID streamcontrol.PlatformName, profile streamcontrol.AbstractStreamProfile, customArgs ...any, ) error
func (*Client) BanUser ¶
func (c *Client) BanUser( ctx context.Context, platID streamcontrol.PlatformName, userID streamcontrol.ChatUserID, reason string, deadline time.Time, ) error
func (*Client) DialContext ¶
func (*Client) EXPERIMENTAL_ReinitStreamControllers ¶
func (*Client) EndStream ¶
func (c *Client) EndStream( ctx context.Context, platID streamcontrol.PlatformName, ) error
func (*Client) GetBackendInfo ¶
func (c *Client) GetBackendInfo( ctx context.Context, platID streamcontrol.PlatformName, ) (*api.BackendInfo, error)
func (*Client) GetLoggingLevel ¶
func (*Client) GetStreamPlayer ¶
func (c *Client) GetStreamPlayer( ctx context.Context, streamID streamtypes.StreamID, ) (*api.StreamPlayer, error)
func (*Client) GetStreamStatus ¶
func (c *Client) GetStreamStatus( ctx context.Context, platID streamcontrol.PlatformName, ) (*streamcontrol.StreamStatus, error)
func (*Client) GetVariable ¶
func (*Client) GetVariableHash ¶
func (*Client) IsBackendEnabled ¶
func (c *Client) IsBackendEnabled( ctx context.Context, id streamcontrol.PlatformName, ) (bool, error)
func (*Client) ListIncomingStreams ¶
func (*Client) ListStreamDestinations ¶
func (*Client) ListStreamForwards ¶
func (*Client) ListStreamPlayers ¶
func (*Client) ListStreamServers ¶
func (*Client) ListTimers ¶
func (*Client) ListTriggerRules ¶
func (*Client) Ping ¶
func (c *Client) Ping( ctx context.Context, beforeSend func(context.Context, *streamd_grpc.PingRequest), ) error
func (*Client) RemoveChatMessage ¶
func (c *Client) RemoveChatMessage( ctx context.Context, platID streamcontrol.PlatformName, msgID streamcontrol.ChatMessageID, ) error
func (*Client) RemoveIncomingStream ¶
func (*Client) RemoveStreamDestination ¶
func (*Client) RemoveStreamForward ¶
func (*Client) RemoveStreamPlayer ¶
func (*Client) RemoveTimer ¶
func (*Client) RemoveTriggerRule ¶
func (*Client) SendChatMessage ¶
func (c *Client) SendChatMessage( ctx context.Context, platID streamcontrol.PlatformName, message string, ) error
func (*Client) SetDescription ¶
func (c *Client) SetDescription( ctx context.Context, platID streamcontrol.PlatformName, description string, ) error
func (*Client) SetLoggingLevel ¶
func (*Client) SetTitle ¶
func (c *Client) SetTitle( ctx context.Context, platID streamcontrol.PlatformName, title string, ) error
func (*Client) SetVariable ¶
func (*Client) StartStream ¶
func (c *Client) StartStream( ctx context.Context, platID streamcontrol.PlatformName, title string, description string, profile streamcontrol.AbstractStreamProfile, customArgs ...any, ) error
func (*Client) StartStreamServer ¶
func (c *Client) StartStreamServer( ctx context.Context, serverType api.StreamServerType, listenAddr string, opts ...streamportserver.Option, ) error
func (*Client) StopStreamServer ¶
func (*Client) StreamPlayerClose ¶
func (*Client) StreamPlayerEndChan ¶
func (*Client) StreamPlayerGetLength ¶
func (*Client) StreamPlayerGetLink ¶
func (*Client) StreamPlayerGetPosition ¶
func (*Client) StreamPlayerIsEnded ¶
func (*Client) StreamPlayerOpenURL ¶
func (*Client) StreamPlayerProcessTitle ¶
func (*Client) StreamPlayerSetPause ¶
func (*Client) StreamPlayerSetSpeed ¶
func (*Client) StreamPlayerStop ¶
func (*Client) SubmitEvent ¶
func (*Client) SubmitOAuthCode ¶
func (c *Client) SubmitOAuthCode( ctx context.Context, req *streamd_grpc.SubmitOAuthCodeRequest, ) (*streamd_grpc.SubmitOAuthCodeReply, error)
func (*Client) SubscribeToChatMessages ¶
func (*Client) SubscribeToConfigChanges ¶
func (*Client) SubscribeToIncomingStreamsChanges ¶
func (*Client) SubscribeToOAuthURLs ¶
func (c *Client) SubscribeToOAuthURLs( ctx context.Context, listenPort uint16, ) (<-chan *streamd_grpc.OAuthRequest, error)
func (*Client) SubscribeToStreamDestinationsChanges ¶
func (*Client) SubscribeToStreamForwardsChanges ¶
func (*Client) SubscribeToStreamPlayersChanges ¶
func (*Client) SubscribeToStreamServersChanges ¶
func (*Client) SubscribeToStreamsChanges ¶
func (*Client) UpdateStream ¶
func (c *Client) UpdateStream( ctx context.Context, platID streamcontrol.PlatformName, title string, description string, profile streamcontrol.AbstractStreamProfile, customArgs ...any, ) error
func (*Client) UpdateStreamDestination ¶
func (*Client) UpdateStreamForward ¶
func (*Client) UpdateStreamPlayer ¶
func (*Client) UpdateTriggerRule ¶
func (c *Client) UpdateTriggerRule( ctx context.Context, ruleID api.TriggerRuleID, triggerRule *api.TriggerRule, ) error
type Config ¶
type Config struct { UsePersistentConnection bool CallWrapper CallWrapperFunc ConnectWrapper ConnectWrapperFunc Reconnect ReconnectConfig }
type ConnectWrapperFunc ¶
type ConnectWrapperFunc func( ctx context.Context, connectFunc func(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error), opts ...grpc.DialOption, ) (*grpc.ClientConn, error)
type OBSInstanceID ¶
type OBSInstanceID = streamtypes.OBSInstanceID
type OptionCallWrapper ¶
type OptionCallWrapper CallWrapperFunc
func (OptionCallWrapper) Apply ¶
func (opt OptionCallWrapper) Apply(cfg *Config)
type OptionConnectWrapper ¶
type OptionConnectWrapper ConnectWrapperFunc
func (OptionConnectWrapper) Apply ¶
func (opt OptionConnectWrapper) Apply(cfg *Config)
type OptionReconnectInitialInterval ¶
func (OptionReconnectInitialInterval) Apply ¶
func (opt OptionReconnectInitialInterval) Apply(cfg *Config)
type OptionReconnectIntervalMultiplier ¶
type OptionReconnectIntervalMultiplier float64
func (OptionReconnectIntervalMultiplier) Apply ¶
func (opt OptionReconnectIntervalMultiplier) Apply(cfg *Config)
type OptionReconnectMaximalInterval ¶
func (OptionReconnectMaximalInterval) Apply ¶
func (opt OptionReconnectMaximalInterval) Apply(cfg *Config)
type OptionUsePersistentConnection ¶
type OptionUsePersistentConnection bool
func (OptionUsePersistentConnection) Apply ¶
func (opt OptionUsePersistentConnection) Apply(cfg *Config)
Click to show internal directories.
Click to hide internal directories.