server

package
v0.0.0-...-7ae9f15 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronFn

type CronFn func(ctx context.Context, db *database.DB, stats *statsd.Client) error

type Middleware

type Middleware func(http.Handler) http.Handler

type Option

type Option func(*Server)

func IsProductionEnvironment

func IsProductionEnvironment(v bool) Option

func IsTestEnvironment

func IsTestEnvironment(v bool) Option

func TrackUsageData

func TrackUsageData(v bool) Option

func WithCron

func WithCron(cronFn CronFn) Option

func WithReleaseVersion

func WithReleaseVersion(releaseVersion string) Option

func WithStatsd

func WithStatsd(statsd *statsd.Client) Option

func WithUpdateInfo

func WithUpdateInfo(updateInfo shared.UpdateInfo) Option

type Server

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

func NewServer

func NewServer(db *database.DB, options ...Option) *Server

func (*Server) Run

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

func (*Server) UpdateReleaseVersion

func (s *Server) UpdateReleaseVersion(v string, updateInfo shared.UpdateInfo)

Jump to

Keyboard shortcuts

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