view

package
v0.0.0-...-71eb8d2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("viewer",
	fx.Provide(
		fx.Annotate(
			New,
			fx.ParamTags(`group:"viewOptions"`),
		),
	),
)

Functions

func AsOption

func AsOption(f any) any

Types

type EventRepository

type EventRepository interface {
	GetAlert(ctx context.Context, droneID string) (*event.AlertSignalled, error)
	GetTelemetry(ctx context.Context, droneID string) (*event.TelemetryUpdated, error)
	GetPosition(ctx context.Context, droneID string) (*event.PositionChanged, error)
	GetActiveDrones(ctx context.Context, d time.Duration) ([]string, error)
}

type Option

type Option func(srv *Server)

func WithLogger

func WithLogger(logger zerolog.Logger) Option

func WithRepository

func WithRepository(repo EventRepository) Option

type Server

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

func New

func New(opts ...Option) *Server

func (*Server) Run

func (srv *Server) Run(ctx context.Context, addr string) error

Jump to

Keyboard shortcuts

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