Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilePublisher ¶
type FilePublisher struct {
// Folder where the file will be saved.
Folder string
// Title of the mission.
Title string
}
FilePublisher publishes ACMI messages to a file.
func (*FilePublisher) Publish ¶
func (p *FilePublisher) Publish(ctx context.Context, initials InitialsProvider, messages <-chan string) error
Publish implements [Publisher.Publish] by writing messages to a file. The file is created in the FilePublisher's folder, and is named using the FilePublisher's title and the current date and time.
type Initials ¶
Initials implements InitialsProvider.
type InitialsProvider ¶
type InitialsProvider interface {
// Get returns the ACMI lines for the initial global object and navaids state.
Get() ([]string, error)
}
InitialsProvider provides initial object state.
type Publisher ¶
type Publisher interface {
// Publish is a blocking function that publishes ACMI messages to an output until the context is cancelled.
Publish(ctx context.Context, initials InitialsProvider, messages <-chan string) error
}
Publisher publishes ACMI messages to an output.
type Server ¶
type Server struct {
// Address to listen on.
Address string
// Password required for clients to connect.
Password string
}
Server listens for real-time telemetry client connections and publishes ACMI messages over TCP.
type StdoutPublisher ¶
type StdoutPublisher struct{}
StdoutPublisher publishes ACMI messages to stdout.
func (*StdoutPublisher) Publish ¶
func (p *StdoutPublisher) Publish(ctx context.Context, initials InitialsProvider, messages <-chan string) error
Publish implements [Publisher.Publish] by writing messages to stdout.
Click to show internal directories.
Click to hide internal directories.