core

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: AGPL-3.0 Imports: 5 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 GetAuth added in v0.0.26

func GetAuth(ctx context.Context) *v1.Client_Auth

func GetHTTPListener

func GetHTTPListener(ctx context.Context) net.Listener

func GetHTTPServer

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

func Now

func Now(ctx context.Context) time.Time

func SetAuth added in v0.0.26

func SetAuth(ctx context.Context, a *v1.Client_Auth) context.Context

func SetHTTPListener

func SetHTTPListener(ctx context.Context, ls net.Listener) 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