Documentation
¶
Index ¶
- type AddDestinationFailedEvent
- type AppStateChangedEvent
- type Bus
- type ClientID
- type Command
- type CommandAddDestination
- type CommandCloseOtherInstance
- type CommandKillServer
- type CommandListDestinations
- type CommandRemoveDestination
- type CommandStartDestination
- type CommandStopDestination
- type CommandUpdateDestination
- type DestinationAddedEvent
- type DestinationRemovedEvent
- type DestinationStartedEvent
- type DestinationStoppedEvent
- type DestinationStreamExitedEvent
- type DestinationUpdatedEvent
- type DestinationsListedEvent
- type Event
- type FatalErrorOccurredEvent
- type ListDestinationsFailedEvent
- type MediaServerStartedEvent
- type Name
- type OtherInstanceDetectedEvent
- type RemoveDestinationFailedEvent
- type StartDestinationFailedEvent
- type StopDestinationFailedEvent
- type UpdateDestinationFailedEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddDestinationFailedEvent ¶
AddDestinationFailedEvent is emitted when a destination fails to be added.
func (AddDestinationFailedEvent) EventName ¶ added in v0.0.10
func (e AddDestinationFailedEvent) EventName() Name
type AppStateChangedEvent ¶
AppStateChangedEvent is emitted when the application state changes.
func (AppStateChangedEvent) EventName ¶ added in v0.0.10
func (e AppStateChangedEvent) EventName() Name
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is an event bus.
func (*Bus) Deregister ¶ added in v0.0.10
Deregister deregisters a consumer for all events.
type ClientID ¶ added in v0.0.12
type ClientID string
ClientID is a unique identifier for a client.
func NewClientID ¶ added in v0.0.12
func NewClientID() ClientID
NewClientID generates a new unique client ID.
type Command ¶
type Command interface {
Name() string
}
Command is an interface for commands that can be triggered by the terminal user interface.
type CommandAddDestination ¶
CommandAddDestination adds a destination.
func (CommandAddDestination) Name ¶
func (c CommandAddDestination) Name() string
Name implements the Command interface.
type CommandCloseOtherInstance ¶
type CommandCloseOtherInstance struct{}
CommandCloseOtherInstance closes the other instance of the application.
func (CommandCloseOtherInstance) Name ¶
func (c CommandCloseOtherInstance) Name() string
Name implements the Command interface.
type CommandKillServer ¶ added in v0.0.10
type CommandKillServer struct{}
CommandKillServer kills the server.
func (CommandKillServer) Name ¶ added in v0.0.10
func (c CommandKillServer) Name() string
Name implements the Command interface.
type CommandListDestinations ¶ added in v0.0.12
type CommandListDestinations struct{}
CommandListDestinations lists all destinations.
func (CommandListDestinations) Name ¶ added in v0.0.12
func (c CommandListDestinations) Name() string
Name implements the Command interface.
type CommandRemoveDestination ¶
type CommandRemoveDestination struct {
ID uuid.UUID
Force bool // Remove the destination even if it is running.
}
CommandRemoveDestination removes a destination.
func (CommandRemoveDestination) Name ¶
func (c CommandRemoveDestination) Name() string
Name implements the Command interface.
type CommandStartDestination ¶
CommandStartDestination starts a destination.
func (CommandStartDestination) Name ¶
func (c CommandStartDestination) Name() string
Name implements the Command interface.
type CommandStopDestination ¶
CommandStopDestination stops a destination.
func (CommandStopDestination) Name ¶
func (c CommandStopDestination) Name() string
Name implements the Command interface.
type CommandUpdateDestination ¶ added in v0.0.12
type CommandUpdateDestination struct {
ID uuid.UUID
DestinationName optional.V[string]
URL optional.V[string]
}
CommandUpdateDestination updates a destination.
func (CommandUpdateDestination) Name ¶ added in v0.0.12
func (c CommandUpdateDestination) Name() string
Name implements the Command interface.
type DestinationAddedEvent ¶
DestinationAddedEvent is emitted when a destination is successfully added.
func (DestinationAddedEvent) EventName ¶ added in v0.0.10
func (e DestinationAddedEvent) EventName() Name
type DestinationRemovedEvent ¶
DestinationRemovedEvent is emitted when a destination is successfully removed.
func (DestinationRemovedEvent) EventName ¶ added in v0.0.10
func (e DestinationRemovedEvent) EventName() Name
type DestinationStartedEvent ¶ added in v0.0.12
DestinationStartedEvent is emitted when a destination starts successfully.
func (DestinationStartedEvent) EventName ¶ added in v0.0.12
func (e DestinationStartedEvent) EventName() Name
type DestinationStoppedEvent ¶ added in v0.0.12
DestinationStoppedEvent is emitted when a destination stops successfully.
func (DestinationStoppedEvent) EventName ¶ added in v0.0.12
func (e DestinationStoppedEvent) EventName() Name
type DestinationStreamExitedEvent ¶
DestinationStreamExitedEvent is emitted when a destination goes off-air unexpectedly.
func (DestinationStreamExitedEvent) EventName ¶ added in v0.0.10
func (e DestinationStreamExitedEvent) EventName() Name
type DestinationUpdatedEvent ¶ added in v0.0.12
DestinationUpdatedEvent is emitted when a destination is successfully updated.
func (DestinationUpdatedEvent) EventName ¶ added in v0.0.12
func (e DestinationUpdatedEvent) EventName() Name
type DestinationsListedEvent ¶ added in v0.0.12
type DestinationsListedEvent struct {
Destinations []domain.Destination
}
DestinationsListedEvent is emitted when the list of destinations is successfully retrieved.
func (DestinationsListedEvent) EventName ¶ added in v0.0.12
func (e DestinationsListedEvent) EventName() Name
type Event ¶
type Event interface {
EventName() Name
}
Event represents something which happened in the appllication.
type FatalErrorOccurredEvent ¶
type FatalErrorOccurredEvent struct {
Message string
}
FatalErrorOccurredEvent is emitted when a fatal application error occurs.
func (FatalErrorOccurredEvent) EventName ¶ added in v0.0.10
func (e FatalErrorOccurredEvent) EventName() Name
type ListDestinationsFailedEvent ¶ added in v0.0.12
type ListDestinationsFailedEvent struct {
Err error
}
ListDestinationsFailedEvent is emitted when the list of destinations fails to be retrieved.
func (ListDestinationsFailedEvent) EventName ¶ added in v0.0.12
func (e ListDestinationsFailedEvent) EventName() Name
type MediaServerStartedEvent ¶
type MediaServerStartedEvent struct{}
MediaServerStartedEvent is emitted when the mediaserver component starts successfully.
func (MediaServerStartedEvent) EventName ¶ added in v0.0.10
func (e MediaServerStartedEvent) EventName() Name
type Name ¶
type Name string
const ( EventNameAppStateChanged Name = "app_state_changed" EventNameDestinationsListed Name = "destinations_listed" EventNameListDestinationsFailed Name = "list_destinations_failed" EventNameDestinationAdded Name = "destination_added" EventNameAddDestinationFailed Name = "add_destination_failed" EventNameDestinationUpdated Name = "destination_updated" EventNameUpdateDestinationFailed Name = "update_destination_failed" EventNameDestinationStreamExited Name = "destination_stream_exited" EventNameDestinationStarted Name = "destination_started" EventNameStartDestinationFailed Name = "start_destination_failed" EventNameDestinationStopped Name = "destination_stopped" EventNameStopDestinationFailed Name = "stop_destination_failed" EventNameDestinationRemoved Name = "destination_removed" EventNameRemoveDestinationFailed Name = "remove_destination_failed" EventNameFatalErrorOccurred Name = "fatal_error_occurred" EventNameOtherInstanceDetected Name = "other_instance_detected" EventNameMediaServerStarted Name = "media_server_started" )
type OtherInstanceDetectedEvent ¶
type OtherInstanceDetectedEvent struct{}
OtherInstanceDetectedEvent is emitted when the app launches and detects another instance.
func (OtherInstanceDetectedEvent) EventName ¶ added in v0.0.10
func (e OtherInstanceDetectedEvent) EventName() Name
type RemoveDestinationFailedEvent ¶
RemoveDestinationFailedEvent is emitted when a destination fails to be removed.
func (RemoveDestinationFailedEvent) EventName ¶ added in v0.0.10
func (e RemoveDestinationFailedEvent) EventName() Name
type StartDestinationFailedEvent ¶
StartDestinationFailedEvent is emitted when a destination fails to start.
func (StartDestinationFailedEvent) EventName ¶ added in v0.0.10
func (e StartDestinationFailedEvent) EventName() Name
type StopDestinationFailedEvent ¶ added in v0.0.12
StopDestinationFailedEvent is emitted when a destination fails to stop.
func (StopDestinationFailedEvent) EventName ¶ added in v0.0.12
func (e StopDestinationFailedEvent) EventName() Name
type UpdateDestinationFailedEvent ¶ added in v0.0.12
UpdateDestinationFailedEvent is emitted when a destination fails to be updated.
func (UpdateDestinationFailedEvent) EventName ¶ added in v0.0.12
func (e UpdateDestinationFailedEvent) EventName() Name