sdk

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 53 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DryRunWiring

func DryRunWiring[S dig2.SDK](decorator func(sdk dig2.SDK) S, opts ...Opt) error

DryRunWiring instantiates an SDK and dry runs its lifecycle to detect possible problems with dependency injection, i.e. missing dependencies, duplicate provisions, cyclic dependencies

func DryRunWiringWithContainer added in v0.4.1

func DryRunWiringWithContainer[S dig2.SDK](decorator func(sdk dig2.SDK) S, c dig2.Container, opts ...Opt) error

func NewContainer added in v0.4.1

func NewContainer(opts ...dig.Option) *baseContainer

func NewGRPCServer added in v0.4.1

func NewGRPCServer(configProvider driver.ConfigService) (*grpc2.GRPCServer, error)

func NewOperationsLogger added in v0.4.1

func NewOperationsLogger(opts *operations.Options) operations.OperationsLogger

func NewOperationsOptions added in v0.4.1

func NewOperationsOptions(configProvider driver.ConfigService) (*operations.Options, error)

func NewServerConfig added in v0.4.1

func NewServerConfig(configProvider driver.ConfigService) (grpc2.ServerConfig, error)

func Serve added in v0.4.1

func Serve(grpcServer *grpc2.GRPCServer, webServer Server, operationsSystem *operations.System, kvss *kvs.KVS, ctx context.Context)

Types

type Opt

type Opt = func(*mockConfigService)

func WithBool

func WithBool(key string, value bool) Opt

func WithString

func WithString(key, value string) Opt

type SDK

type SDK struct {
	dig2.SDK
}

func NewSDK

func NewSDK(registry services.Registry) *SDK

func NewSDKFrom added in v0.4.1

func NewSDKFrom(baseSDK dig2.SDK, registry services.Registry) *SDK

func NewSDKFromContainer added in v0.4.1

func NewSDKFromContainer(c dig2.Container, registry services.Registry) *SDK

func (*SDK) Install

func (p *SDK) Install() error

func (*SDK) PostStart added in v0.4.1

func (p *SDK) PostStart(ctx context.Context) error

func (*SDK) Start

func (p *SDK) Start(ctx context.Context) error

type Server added in v0.4.1

type Server interface {
	RegisterHandler(s string, handler http.Handler, secure bool)
	Start() error
	Stop() error
}

func NewWebServer added in v0.4.1

func NewWebServer(configProvider driver.ConfigService, viewManager server.ViewManager, tracerProvider tracing.Provider) Server

type StartableViewManager added in v0.4.1

type StartableViewManager interface {
	NewView(id string, in []byte) (view.View, error)
	InitiateView(view view.View, ctx context.Context) (interface{}, error)
	InitiateContext(view view.View) (view.Context, error)
	InitiateContextWithIdentity(view view.View, id view.Identity) (view.Context, error)
	InitiateContextFrom(ctx context.Context, view view.View, id view.Identity, contextID string) (view.Context, error)
	Context(contextID string) (view.Context, error)
	Start(ctx context.Context)
}

type TracerProviders added in v0.4.1

type TracerProviders struct {
	dig.Out

	// Base explicitly requires no bound metrics provider
	Base trace.TracerProvider `name:"base-tracer-provider"`

	// Backed explicitly requires a bound metrics provider
	Backed trace.TracerProvider `name:"backed-tracer-provider"`

	// Default is the default tracing provider
	Default tracing.Provider
}

Directories

Path Synopsis
support

Jump to

Keyboard shortcuts

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