core

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Elapsed added in v0.0.16

func Elapsed(ctx context.Context, since time.Time) time.Duration

func GetHTTPListener

func GetHTTPListener(ctx context.Context) net.Listener

func GetHTTPSListener

func GetHTTPSListener(ctx context.Context) net.Listener

func GetHTTPSServer

func GetHTTPSServer(ctx context.Context) *http.Server

func GetHTTPServer

func GetHTTPServer(ctx context.Context) *http.Server

func Now

func Now(ctx context.Context) time.Time

func SetHTTPListener

func SetHTTPListener(ctx context.Context, ls net.Listener) context.Context

func SetHTTPSListener

func SetHTTPSListener(ctx context.Context, ls net.Listener) context.Context

func SetHTTPSServer

func SetHTTPSServer(ctx context.Context, ls *http.Server) context.Context

func SetHTTPServer

func SetHTTPServer(ctx context.Context, ls *http.Server) context.Context

func SetNow

func SetNow(ctx context.Context, now NowFunc) context.Context

Types

type NowFunc

type NowFunc func() time.Time

NowFunc a functions that returns the current time.

func GetNow

func GetNow(ctx context.Context) NowFunc

Jump to

Keyboard shortcuts

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