services

package
v0.0.0-...-1a3a2fa Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package services avoids having to wrap contexts so much for multiple services.

Index

Constants

View Source
const ServiceKey serviceKey = "service"

Variables

This section is empty.

Functions

func CtxWith

func CtxWith(ctx context.Context, svc Services) context.Context

func Value

func Value(ctx context.Context, key any) any

func WithValue

func WithValue(ctx context.Context, key, val any) context.Context

Types

type Services

type Services interface {
	Set(key, val any)
	Value(key any) any
}

func New

func New() Services

Jump to

Keyboard shortcuts

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