package dependency

import "github.com/influxdata/flux/dependency"

Index

Functions

func OnFinish

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

func OnFinishFunc

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()

Source Files

dependency.go

Version
v0.196.1 (latest)
Published
Feb 19, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
1 day ago

Tools for package owners.