private

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package private is an internal holder of state that different Service Weaver packages share without exposing it externally. E.g., if module X wants to expose a function to module Y without making it public, X can store the function in a variable in private and Y can read it from there.

Index

Constants

This section is empty.

Variables

View Source
var Start func(ctx context.Context, options AppOptions) (App, error)

Starts starts a Service Weaver application.

Functions

This section is empty.

Types

type App added in v0.13.0

type App interface {
	// Get fetches the component with interface type t from wlet.
	Get(requester string, t reflect.Type) (any, error)

	// GetImpl fetches the component implementation with type t from wlet.
	GetImpl(requester string, t reflect.Type) (any, error)
}

App is an internal handle to a Service Weaver application.

type AppOptions added in v0.13.0

type AppOptions struct {
	// Fakes holds a mapping from component interface type to the fake
	// implementation to use for that component.
	Fakes map[reflect.Type]any
}

AppOptions controls a Service Weaver application execution.

Jump to

Keyboard shortcuts

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