application

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

package application is the main package for the SkyEye application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	// Run runs the SkyEye application. It should be called exactly once.
	Run(context.Context, context.CancelFunc, *sync.WaitGroup) error
}

Application is the interface for running the SkyEye application.

func NewApplication

func NewApplication(ctx context.Context, config conf.Configuration) (Application, error)

NewApplication constructs a new Application.

type Message added in v0.6.0

type Message[T any] struct {
	Context context.Context
	Data    T
}

Message binds a context to data. It should only be used for passing a request context and data together through channels. The receiver should immediately extract the context and data from the message and use them independently. If you're passing a Message as a function parameter, you are misusing it.

func AsMessage added in v0.6.0

func AsMessage[T any](ctx context.Context, data T) Message[T]

AsMessage creates a Message from a context and data. The message should be immediately sent through a channel.

Jump to

Keyboard shortcuts

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