dependency

package
v0.170.1-fips1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnFinish

func OnFinish(ctx context.Context, c io.Closer)

func OnFinishFunc added in v0.161.0

func OnFinishFunc(ctx context.Context, fn func() error)

Types

type Interface

type Interface interface {
	Inject(ctx context.Context) context.Context
}

Interface is an interface that must be implemented by every injectable dependency. On Inject, the dependency is injected into the context and the resulting one is returned. Every dependency must provide a function to extract it from the context.

type List

type List []Interface

func (List) Inject

func (l List) Inject(ctx context.Context) context.Context

type Span

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

func Inject

func Inject(ctx context.Context, deps ...Interface) (context.Context, *Span)

func (*Span) Finish

func (s *Span) Finish()

Jump to

Keyboard shortcuts

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