provider

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Label added in v1.4.2

func Label(ctx context.Context) string

Label returns the label from the context, or zero value if not defined

func Logger added in v1.4.2

func Logger(ctx context.Context) server.Logger

Logger returns the logger from the context, or nil if not defined

func NewProvider

func NewProvider(tasks ...server.Task) server.Provider

Create a new provider with tasks in the order they have been created.

func WithLabel added in v1.4.2

func WithLabel(ctx context.Context, label string) context.Context

WithLabel returns a context with the given label

func WithLogger added in v1.4.2

func WithLogger(ctx context.Context, logger server.Logger) context.Context

WithLogger returns a context with the given logger

Types

type PluginMeta added in v1.4.2

type PluginMeta struct {
	Name        string
	Description string
	Fields      map[string]metafield
}

func NewMeta added in v1.4.2

func NewMeta(v server.Plugin) (*PluginMeta, error)

NewMeta returns metadata for a plugin

func (*PluginMeta) Get added in v1.4.2

func (m *PluginMeta) Get(v server.Plugin, key string) any

func (*PluginMeta) Set added in v1.4.2

func (m *PluginMeta) Set(v server.Plugin, key string, value any)

type ProviderContextKey added in v1.4.2

type ProviderContextKey int

Jump to

Keyboard shortcuts

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