server

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	stop <-chan struct{},
	opts ...ServerOption,
) api_adapter_v1.AdapterServer

New returns an AdapterServer that wraps the given high-level Adapter implementation with the Tokens field populated from the file which name is configured in the AUTH_TOKENS_PATH environment variable. The stop channel is used to signal when the file watcher should be closed and stop watching for file changes.

func RegisterAdapter added in v0.7.1

func RegisterAdapter[Config any](s api_adapter_v1.AdapterServer, datasourceType string, adapter framework.Adapter[Config]) error

RegisterAdapter registers a new high-level Adapter implementation with the server. The Config type parameter is the type of the config object that will be passed to the high-level Adapter implementation.

If this function is called with the datasource type of an already-registered Adapter, it will return an error.

Types

type Server added in v0.7.2

type Server = internal.Server

type ServerOption added in v0.20.0

type ServerOption func(*serverConfig)

ServerOption are options for configuring the AdapterServer.

func WithLogger added in v0.20.0

func WithLogger(logger logs.Logger) ServerOption

WithLogger configures the server to use the provided logger. The logger must implement the logs.Logger interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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