server

package
v0.0.0-...-a035791 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ScreenshotInterval       time.Duration `default:"45s" "the interval between screenshots"`
	ScreenshotIntervalJitter bool          `default:"false" "if true, will jitter screenshot interval"`
}

type ScreenshotDest

type ScreenshotDest interface {
	Store(context.Context, time.Time, *utils.SerializedImage) error
}

type ScreenshotSource

type ScreenshotSource interface {
	Screenshot(context.Context) (*utils.SerializedImage, error)
}

type Server

type Server struct {
	http.Handler
	// contains filtered or unexported fields
}

func New

func New(cfg Config, source ScreenshotSource, dest ScreenshotDest) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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